Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Inserting and updating NULLs
Conditions in UPDATE and DELETE
10. DELETE with conditions: AND, OR
Using values from another column
Return rows in INSERT, UPDATE, DELETE
Summary

Instruction

Great! You can also use more than one condition in DELETE statements.

The statement below removes all the English exam data for students with no date for an oral or written English exam:

DELETE FROM Exam
WHERE Subject = N'English' 
AND (WrittenExamDate IS NULL 
OR OralExamDate IS NULL);

Notice that we used both the AND and OR operators in the WHERE clause.

Exercise

Our university is not accredited to conduct exams in Spanish and Mathematics. Delete all records for these exams.