top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How does a syntax error differ from a runtime error in Oracle SQL?

+2 votes
391 views
How does a syntax error differ from a runtime error in Oracle SQL?
posted Nov 11, 2014 by Archana

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

A syntax error can be detected by the PL/SQL compiler. A runtime error occurs
while the program is running and cannot be detected by the PL/SQL compiler.

A misspelled keyword is an example of a syntax error. For example, this script:

BEIN
DBMS_OUTPUT.PUT_LINE ('This is a test');
END;

contains a syntax error. Try to find it.

A SELECT INTO statement returning no rows is an example of a runtime error. This
error can be handled with the help of the exception-handling section of the
PL/SQL block.

answer Nov 12, 2014 by Arun Gowda
...