Our first look at manipulating data involves one of the most fundamental operations in an RDBMS—the ability to add data. This section looks at ways to create data within an Oracle database.
The primary command in SQL that allows users to create the data that resides in tables is the INSERT
statement. With it, we can add rows to an existing table, provided that the format we use for the statement fits with the existing column structure. The syntax tree for the basic INSERT
statement is as follows:
INSERT INTO {table_name} VALUES (value1, value2, ... );
Considering the lengths to which we've taken our SELECT
statements thus far, it may seem that the syntax for the INSERT
statement is considerably more straightforward. Generally, this is the case, although the degree of simplicity in an INSERT
is dependent on the simplicity of the table itself. If we examine our basic INSERT
statement, the first keyword we encounter is INSERT...