Multiple choice technology databases

Given the following statement: CREATE TABLE t1 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?

  1. COL1

  2. COL2

  3. COL3

  4. COL4

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The CREATE TABLE statement will fail at COL2 because 'WITH DEFAULT NONE' is not valid DB2 syntax. The DEFAULT clause requires a specific value (like a constant, CURRENT DATE, or NULL). 'NONE' is not recognized as a valid default value. The other column definitions are syntactically correct.