Which of the following deletion rules on CREATE TABLE will allow parent table rows to be deleted if a dependen
Which of the following deletion rules on CREATE TABLE will allow parent table rows to be deleted
if a dependent row exists?
Which of the following INSERT statements will fail?
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?
Which of the following actions may cause a trigger to be fired?
Which of the following actions may cause a trigger to be fired?
Which of the following DB2 data types has a fixed length?
Which of the following DB2 data types has a fixed length?
A UDT is a data type which:
A UDT is a data type which:
Which of the following would be the most appropriate DB2 data type to use for column COL1?
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?
Which of the following definitions will cause the CREATE TABLE statement to fail?
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?
How many unique indexes are defined for table TAB1?
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?
Which of the following INSERT statements will execute successfully?
Given the following statements:
CREATE TABLE table1 (col1 INTEGER, col2 CHAR(3));
CREATE VIEW view1 AS
SELECT col1, col2 FROM table1
WHERE col1 < 100
WITH LOCAL CHECK OPTION;
Which of the following INSERT statements will execute successfully?
How many rows will be deleted from TABLEA and TABLEB?
Given the following tables:
TABLEA
EMPIDNAME
—– ——-
1 USER1
2 USER2
TABLEB
EMPID WEEKNO PAYAMT
—– —— ——-
1 1 1000.00
1 2 1000.00
2 1 2000.00
and the fact that TABLEB was defined as follows:
CREATE TABLE tableb (empid SMALLINT,
weekno SMALLINT,
payamt DECIMAL(6,2),
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES tablea(empid)
ON DELETE NO ACTION)
If the following command is issued:
DELETE FROM tablea WHERE empid=2
How many rows will be deleted from TABLEA and TABLEB?