PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

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?

Which of the following statements is NOT true?

The following triggers were defined for a table named SALES in the order shown:
CREATE TRIGGER trigger_a
NO CASCADE BEFORE UPDATE ON sales
REFERENCING NEW AS new
FOR EACH ROW
SET new.commission = sale_amt * .05
WHERE invoice = n.invoice;
CREATE TRIGGER trigger_b
AFTER INSERT ON sales
REFERENCING NEW AS new
FOR EACH ROW
UPDATE sales SET bill_date = CURRENT DATE + 30 DAYS
WHERE invoice = n.invoice;
CREATE TRIGGER trigger_c
NO CASCADE BEFORE DELETE ON sales
FOR EACH ROW
SIGNAL SQLSTATE ‘75005’
SET MESSAGE_TEXT = ‘Deletes not allowed!’;
Which of the following statements is NOT true?


Page 644 of 1,258« First...102030...642643644645646...650660670...Last »