8. SQL Statements : CREATE TABLE : Column Specification--Define Column Characteristics : System_Maintained Logical Keys
 
Share this page                  
System_Maintained Logical Keys
SYSTEM_MAINTAINED logical key columns are assigned values by the DBMS Server, and cannot be assigned values by applications or end users. The following restrictions apply to logical keys specified as WITH SYSTEM_MAINTAINED:
The only valid default clause is WITH DEFAULT. If the default clause is omitted, WITH DEFAULT is assumed.
The only valid null clause is NOT NULL. If a column constraint or null clause is not specified, NOT NULL is assumed.
No table constraint can include a SYSTEM_MAINTAINED logical key column. For details about table constraints, see Column-Level Constraints and Table-Level Constraints (see page Column-Level Constraints and Table-Level Constraints).
System_Maintained Clause
Null Clause
Valid?
WITH SYSTEM_MAINTAINED
NOT NULL
Yes
 
WITH NULL
No
 
NOT NULLWITH DEFAULT
Yes
 
NOT NULL NOT DEFAULT
No
 
(none specified)
Yes
NOT SYSTEM_MAINTAINED
NOT NULL
Yes
 
WITH NULL
Yes
 
NOT NULL WITH DEFAULT
Yes
 
NOT NULL NOT DEFAULT
Yes