If a SQL script file has blank lines in between SQL statements one may see errors when executing the script in SQL*Plus so if one would like to ignore the blanklines in SQL*Plus one can ignore them by set blanklines on.

Example:
SQL> select object_name
2
SQL> from dba_objects;
SP2-0734: unknown command beginning “from dba_o…” – rest of line ignored.
SQL> set sqlblanklines on
SQL> select object_name
2
3 from dba_objects
4 where rownum < 3;

OBJECT_NAME
——————————————————————————–
ICOL$
I_USER1
— Disable blank lines in between SQL statements
SQL> set sqlblanklines off

One response to “How to skip blank lines in between SQL statements in SQL*Plus?”

  1. skhawar03 Avatar

    Correct syntax is
    Name
    SET SQLBLANKLINES — Not available in iSQL*Plus

    Like

Leave a reply to skhawar03 Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.