ORA-00924: missing BY keyword

ORA-00924: missing BY keyword

Oracle PL/SQL error message: ORA-00924: missing BY keyword

Cause:

The keyword BY was omitted in a GROUP BY, ORDER BY, or CONNECT BY clause. In a GRANT statement, the keyword IDENTIFIED must also be followed by the keyword BY.

Solution:

Correct the syntax. Insert the keyword BY where required and then retry the statement.

Example:

select * from phones order phone_name; 

Output:

ORA-00924: missing BY keyword

Correct:

select * from phones order by phone_name;

Output:

1 rows inserted.