Not NULL column : NOT NULL « Table « Oracle PL/SQL Tutorial






SQL>
SQL> CREATE TABLE myTable (
  2       name  VARCHAR2(25) NOT NULL,
  3       price NUMBER(4,2)  NOT NULL,
  4       start_date DATE);

Table created.

SQL>
SQL> INSERT INTO myTable VALUES ('Product Name 1', 1, NULL);

1 row created.

SQL>
SQL> SELECT * FROM myTable;


NAME                           PRICE START_DAT
------------------------- ---------- ---------
Product Name 1                     1

SQL> drop table myTable;

Table dropped.

SQL>
SQL>








6.11.NOT NULL
6.11.1.Not NULL column
6.11.2.Alter a table column to 'not null'
6.11.3.Add 'NOT NULL' constraint to column with NULL value
6.11.4.Change null status of an existing column
6.11.5.Alter not null and null contraints
6.11.6.ORA-01400: cannot insert NULL into