What is the total number of rows that will be deleted?
If the following SQL statements are executed:
CREATE TABLE make (makeid SMALLINT NOT NULL PRIMARY KEY,
make VARCHAR(25));
CREATE TABLE model (modelid SMALLINT,
model VARCHAR(25),
makeid SMALLINT,
CONSTRAINT const1 FOREIGN KEY (makeid)
REFERENCES make(makeid) ON DELETE RESTRICT);
And each table created is populated as follows:
MAKE
MAKEID MAKE
—— ——–
1 Ford
2 Chevrolet
3 Toyota
MODEL
MODELID MODEL MAKEID
——- ——- ——–
1 Mustang 1
2 Escort 1
3 Malibu 2
4 Camry 3
If the following SQL statement is executed:
DELETE FROM make WHERE makeid = 1
What is the total number of rows that will be deleted?
Which of the following can be inserted into TABLEA?
Given the statement:
CREATE TABLE tablea (col1 INTEGER NOT NULL,
CONSTRAINT const1 CHECK (col1 in (100, 200, 300))
Which of the following can be inserted into TABLEA?
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?