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 »
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: