| Oracle® Database PL/SQL Language Reference 11g Release 2 (11.2) Part Number E10472-05 |
|
|
View PDF |
The PL/SQL extension to the SQL INSERT statement lets you specify a record name in the values_clause of the single_table_insert instead of specifying a column list in the insert_into_clause. Effectively, this form of the INSERT statement inserts the record into the table; actually, it adds a row to the table and gives each column of the row the value of the corresponding record field.
Topics:
Syntax
insert_into_clause ::=
values_clause ::=
Semantics
insert_into_clause
dml_table_expression_clause
Typically a table name. For complete information, see Oracle Database SQL Language Reference.
t_alias
An alias for the item described by dml_table_expression_clause.
values_clause
record_name
The name of a record variable of type RECORD or %ROWTYPE. The record must represent a row of the item described by dml_table_expression_clause. That is, for every column of the row, the record must have a field with a compatible data type (see Table 3-10, "Possible Implicit PL/SQL Data Type Conversions"). If a column has a NOT NULL constraint, then its corresponding field cannot have a NULL value.
Examples
Related Topics
In this chapter:
In other chapters: