Databases Reference
In-Depth Information
The sequence of SQL*Plus commands, the SQL statement, and the results
from the command are as follows:
SQL> ttitle “Department Report”
SQL> column deptno heading “Department|Number”
SQL> column dname heading “Department|Name”
SQL> column loc heading “City|Location”
SQL> spool c:\temp\deptrept.txt
SQL> /
Tue Aug 13 page 1
Department Report
Department Department City
Number Name Location
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> spool off
SQL>
statement again. Instead, we used
the / SQL*Plus command, which reruns the last complete SQL statement executed.
SQL*Plus commands differ from SQL statements in that they don't need a
semicolon at the end (although SQL*Plus commands can be terminated with
a semicolon without SQL*Plus complaining about it). SQL statements can be
written across many lines without any type of continuation character; they are
complete whenever you type a semicolon or use the SQL*Plus / command.
SQL*Plus commands must be contained entirely on one line, unless the - contin-
uation character is used at the end of each line. The example below shows how
the SQL*Plus continuation character is used:
Notice that we didn't type in the entire
SELECT
SQL> column deptno heading -
> “Department|Number”
SQL>
iSQL*Plus
With iSQL*Plus, you connect to the database indirectly via a very “lightweight”
middle tier. The iSQL*Plus tool is essentially the web-enabled version of
Search WWH ::




Custom Search