Given the following statement:
CREATE TABLE tab1
(col1 SMALLINT NOT NULL PRIMARY KEY,
col2 VARCHAR(200) NOT NULL WITH DEFAULT NONE,
col3 DECIMAL(5,2) CHECK (col3 >= 100.00),
col4 DATE NOT NULL WITH DEFAULT)
Which of the following definitions will cause the CREATE TABLE statement to fail?
A.
COL1
B.
COL2
C.
COL3
D.
COL4
B
0
0
Default values
Db2® defines some default values, and you define others (by using the DEFAULT clause in the CREATE TABLE or ALTER TABLE statement).
If a column is defined as NOT NULL WITH DEFAULT or if you do not specify NOT NULL, Db2 stores a default value for a column whenever an insert or load does not provide a value for that column. If a column is defined as NOT NULL, Db2 does not supply a default value.
0
0
Dates DATE CURRENT DATE
0
0