I have 2 tables:
Table1
Attributes: InstructorID, Name, Building
Primary Key: InstructorID
Table2
Attributes: Class, StudentID, AdviserID
Primary Key: StudentID
Foreign Key: AdviserID references InstructorID
I want to delete all rows in table2 that have a relation to a NULL AdviserID from table1. How do I do this manually (without using "on delete cascade")?