Databases Reference
In-Depth Information
Notice that the results of both UPDATE statements appear at the bottom of the
iSQL*Plus browser window.
The INSERT Statement
Whenever new employees are hired in Scott's widget company, new rows must
be added to the EMP table. The INSERT statement does just that. Here's the basic
INSERT syntax:
INSERT INTO tablename [(column1 [, column2 ...])]
VALUES ( value1 [, value2 ... ]);
This format of the INSERT statement inserts only one row at a time. In Scott's
company, the boss realizes that she should probably leave the old boss's employee
information intact and just add herself as a new row in the table. To handle this for
her, we need to perform both an UPDATE and an INSERT on the EMP table. The two
statements and their results are as follows:
update EMP set ENAME = 'KING' where ENAME = 'QUEEN';
insert into EMP (EMPNO, ENAME, JOB, MGR, HIREDATE,
Search WWH ::




Custom Search