INSERT INTO command:
- Values can be inserted for all columns or for the selected columns
- Values can be given by sub query.
- In place of values parameter substitution can also be used with insert.
- If records are not available for all the columns, then the column list must be contained following the table name.
Example:Insert the employee numbers, an increment amount of Rs.500/- and the increment date-today (which is being entered through function SYSDATE) of all the managers into a table INCR (increment due table) from the employee file.
INSERT INTO INCR SELECT EMPNO, 500, SYSDATE FROM EMP WHERE JOB = 'MANAGER';
Example: Insert values in a table using parameter substitution (& operator is used for it 1, 2 are the field numbers).
INSERT INTO EMP #VALUES (&1,'&2','&3', &4, &5, &6,NULL, &7);
Please note these values required to be supplied at run time.
UPDATE Command: Syntax is UPDATE = WHERE ;