PrepAway - Latest Free Exam Questions & Answers

Which of the following statements will remove all rows in table TABLE1 that have matching PERSONs in table TAB

Given the following table definitions:
TABLE1
———————————–
ID INT
NAME CHAR(30)
PERSON INT
CITIES INT
TABLE2
———————————–
ID INT
LASTNAME CHAR(30)
Which of the following statements will remove all rows in table TABLE1 that have matching
PERSONs in table TABLE2?

PrepAway - Latest Free Exam Questions & Answers

A.
DELETE FROM table1 WHERE id IN (SELECT id FROM table2)

B.
DELETE FROM table1 WHERE id IN (SELECT person FROM table2)

C.
DELETE FROM table1 WHERE person IN (SELECT id FROM table2)

D.
DELETE FROM table1 WHERE person IN (SELECT person FROM table2)


Leave a Reply