SQLPlus: Oracle's Command-Line Interface
☰Fullscreen
Table of Content:
SQL*Plus is the most basic Oracle Database utility, with a basic command-line interface, commonly used by users, administrators, and programmers.
Command types
SQL*Plus understands five categories of text:
- SQL statements
- PL/SQL blocks
- SQL*Plus internal commands, for example:
- environment control commands such as SET
- environment monitoring commands such as SHOW
- Comments
- External commands prefixed by the ! char
Scripts can include all of these components.
An Oracle programmer in the appropriately configured software environment can launch SQL*Plus, for example, by entering:
$ sqlplus scott/tiger
where the Oracle user scott
has the password tiger
. SQL*Plus then presents a prompt with the default form of:
SQL>
Interactive use can then start by entering a SQL statement (terminated by a semicolon), a PL/SQL block, or another command. For example:
SQL> select 'Hello world' as example from dual; EXAMPLE -------------------------------- Hello world