Home > Blockchain >  Oracle:ORA-00933: SQL command not properly ended
Oracle:ORA-00933: SQL command not properly ended

Time:02-21

SELECT CName as Cuisine, count(*) as Total FROM REST_CUISINE GROUP BY CName ORDER BY total desc limit 3;

CodePudding user response:

Oracle does not have limit clause. use:

SELECT
    cname    AS cuisine,
    COUNT(*) AS total
FROM
    rest_cuisine
GROUP BY
    cname
ORDER BY
    total DESC
FETCH NEXT 3 ROWS ONLY;
  • Related