Omitting the Column List
You may omit the column list when supplying values for every column:
SQL> CREATE TABLE EMP (EMPNO NUMBER(4) NOT NULL,
2 ENAME VARCHAR2(10),
3 JOB VARCHAR2(9),
4 SAL NUMBER(7, 2),
5 DEPTNO NUMBER(2));
Table created.
SQL>
SQL> INSERT INTO EMP VALUES (1, 'SMITH', 'CLERK', 800, 20);
1 row created.
SQL>
When you omit the column list, the order of the values you supply must match the order of the columns as listed in the output from the DESCRIBE command.
Home »
Oracle »
Table »
Oracle »
Table »
Insert:
- Adding Rows Using the INSERT Statement
- Omitting the Column List
- Specifying a Null Value for a Column
- Single and Double Quotes and INSERT
- Copying Rows from One Table to Another with INSERT
Related: