Oracle语法错误 [英] Oracle syntax error

查看:112
本文介绍了Oracle语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Oracle中遇到以下错误:

I got the following error in Oracle:

SELECT * FROM abcd WHERE name LIKE 'a%' LIMIT 10
                                        *
ERROR at line 1:
ORA-00933: SQL command not properly ended

命令出了什么问题?

推荐答案

Oracle不支持limit子句.那是MySQL/Postgres的事情.

Oracle doesn't support the limit clause. That's a MySQL/Postgres thing.

还有其他选择,尽管它们通常涉及更多

There are alternatives, although they're often a lot more involved

http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html

最简单的等效项是:

select * from abcd where name like 'a%' and ROWNUM <= 10;

这篇关于Oracle语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆