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?
A.
TABLEA – 0, TABLEB – 0
B.
TABLEA – 0, TABLEB – 1
C.
TABLEA – 1, TABLEB – 0
D.
TABLEA – 1, TABLEB – 1