Specifying a Null Value for a Column

You can specify a null value for a column using the NULL keyword.


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 (8, 'Sophie', 'Tester', NULL, NULL);

1 row created.

SQL>
SQL> SELECT * FROM emp;

     EMPNO ENAME      JOB              SAL     DEPTNO
---------- ---------- --------- ---------- ----------
         8 Sophie     Tester

SQL>
Home »
Oracle »
Table » 

Insert:
  1. Adding Rows Using the INSERT Statement
  2. Omitting the Column List
  3. Specifying a Null Value for a Column
  4. Single and Double Quotes and INSERT
  5. Copying Rows from One Table to Another with INSERT
Related: