【发布时间】:2016-07-05 06:52:56
【问题描述】:
sql 接口不允许我在 SQL 查询中使用分号。我该怎么做才能避免这种情况?
select country.country, count(customer.customer_id) as country_count
from customer
join address on customer.address_id = address.address_id
join city on address.city_id = city.city_id
join country on city.country_id = country.country_id
group by country.country_id
order by country_count desc;
limit 10
如果我取消界面给出的分号:
错误:ORA-00907:缺少右括号。
如果我输入界面给出的分号:
错误:ORA-00911:无效字符
在我的 sqllite 程序中,如果没有 ;,查询就可以正常工作。
【问题讨论】:
-
甲骨文真的有
limit吗? (我知道较新的 Oracle 版本有FETCH FIRST,我认为旧版本有 ROWNUM?) -
你在Oracle manual哪里找到
limit?