Database Reference
In-Depth Information
Figure 15.6
Undo Changes
Back to a
SAVEPOINT
Label.
15.3
Adding Data (INSERT)
Adding new rows into a table is done with the INSERT command. The
INSERT command can be used to add to a single table or multiple tables.
The syntax of the single-table INSERT command is shown in Figure 15.7.
You can insert one row into a table using expressions, individual subque-
ries for each column, or a single subquery for all columns. For a single sub-
query filling all columns, use a subquery that retrieves multiple rows instead
of a list of literal values. We cover the multiple-table INSERT command
shortly. The RETURNING portion of the INSERT, UPDATE, and
DELETE statements is essentially PL/SQL (see Chapter 24) but is covered
here as well for the sake of completeness.
Note:
Any literal value such as “hello” or the number 50,000 is an expres-
sion. See Chapter 14 for more information on expressions.
Search WWH ::




Custom Search