Computer Science · Database Management System
Which of the following SQL queries deletes all tuples in the 'teacher' relation for those teachers associated with a department located in the building named 'CSE' in the 'department' relation?
- 1DELETE FROM teacher WHERE dept_name IN 'CSE';
- 2DELETE FROM department WHERE building='CSE';
- 3DELETE FROM teacher WHERE dept_name IN (SELECT dept_name FROM department WHERE building = 'CSE');✓
- 4DELETE FROM teacher WHERE building = 'CSE';
Correct answer
DELETE FROM teacher WHERE dept_name IN (SELECT dept_name FROM department WHERE building = 'CSE');
Download Single Question PDF
Save this question and verified answer as a clean study sheet with live clickable link.
Share with Friends & Study Groups
Challenge your peer aspirants on WhatsApp or Telegram to solve this question!
Preparing for Computer Science?
Practice full-length mock tests with real exam timers, instant score analysis, and all-India ranking.
Want more practice questions on Database Management System?
Solve complete topic-wise tests with detailed solutions on GkGet.
Related Practice Questions
Recommended practice questions in Computer Science · Database Management System