PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
0

B.
1

C.
2

D.
3

One Comment on “What is the total number of rows that will be deleted?


Leave a Reply