SQL Delete
6.Which constraint can prevent deletion of a row?
-
A. CHECK
-
B. DEFAULT
-
C. FOREIGN KEY
-
D. UNIQUE
FOREIGN KEY
FOREIGN KEY
7.Is DELETE a DML command?
-
A. Yes
-
B. No
Yes
Yes
8.Which command resets auto-increment value (MySQL)?
-
A. DELETE
-
B. TRUNCATE
-
C. DROP
-
D. UPDATE
TRUNCATE
TRUNCATE
9.Which of the following allows deleting data from multiple tables?
-
A. DELETE with JOIN (in some RDBMS like MySQL)
-
B. DELETE only one table
-
C. DELETE ALL
-
D. DELETE
DELETE with JOIN (in some RDBMS like MySQL)
DELETE with JOIN (in some RDBMS like MySQL)
10.What is the return value of DELETE query?
-
A. Number of rows deleted
-
B. Always 0
-
C. Always 1
-
D. Total columns removed
Number of rows deleted
Number of rows deleted