This topic describes how to use rows to populate a table.
The following INSERT statement is used to populate a table with rows:
INSERT INTO emp VALUES (7369,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20);
The syntax requires you to remember the order of the columns. The alternative syntax allows you to list the columns, as shown in the following example.
INSERT INTO emp(empno,ename,job,mgr,hiredate,sal,comm,deptno) VALUES (7499,'ALLEN','SALESMAN',7698,'20-FEB-81',1600,300,30);
You can list the columns in a different order or even omit some columns in some cases. For example, when the commission is unknown, the following example shows the corresponding statement:
INSERT INTO emp(empno,ename,job,mgr,hiredate,sal,deptno) VALUES (7369,'SMITH','CLERK',7902,'17-DEC-80',800,20);
Many developers prefer an explicit list of columns to relying on implicit sorting.