If the following statement is executed:
CREATE TABLE employee
(empid INT NOT NULL GENERATED BY DEFAULT
AS IDENTITY (START WITH 1, INCREMENT BY 5),
name VARCHAR(20),
dept INT CHECK (dept BETWEEN 1 AND 20),
hiredate DATE WITH DEFAULT CURRENT DATE,
salary DECIMAL(7,2),
PRIMARY KEY(empid),
CONSTRAINT cst1 CHECK (YEAR(hiredate) > 2006 OR
Salary > 60500));
Which of the following INSERT statements will fail?
Given the following scenario:
Table TABLE1 needs to hold specific numeric values up to 9999999.999 in column COL1. Once TABLE1 is populated, arithmetic operations will be performed on data stored in column COL1. Which of the following would be the most appropriate DB2 data type to use for column COL1?
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?
If the following statement is executed:
CREATE TABLE tab1 (col1 INTEGER NOT NULL,
col2 INTEGER,
CONSTRAINT const1 FOREIGN KEY (col2)
REFERENCES tab1(col1));
How many unique indexes are defined for table TAB1?