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

COL2 is the definition that will cause failure because VARCHAR columns cannot have DEFAULT NONE in DB2. The DEFAULT clause for VARCHAR must specify a valid string value or be omitted entirely. COL1, COL3, and COL4 definitions are syntactically valid.