Chapter 6. SQL*Plus

SQL*Plus is Oracle's primary command-line interface to the database. It allows you to execute SQL statements and PL/SQL blocks and to format output. It also gives you a certain amount of operational control. SQL*Plus has been available since the earliest versions of Oracle (when it was called the User Friendly Interface (UFI)). SQL*Plus can execute the following types of statements:

  • SQL statements (DDL and DML) corresponding to the ANSI SQL standard and Oracle extensions

  • PL/SQL statements, a proprietary SQL language extension from Oracle

  • SQL*Plus statements, proprietary formatting and operational statements from Oracle

In simple terms, this means that SQL*Plus works with source statements directly, without the need for separate compilation. SQL statements are sent to the Oracle server (locally or via Net8 or SQL*Net), where they are parsed and executed. PL/SQL blocks are also sent to the Oracle server, where they are compiled and executed. SQL*Plus statements are executed directly by the running copy of SQL*Plus.

Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.