Reputation: 183
i'm trying to write a delete statement using sql, based off of certain criteria. i am having trouble with it. here is the criteria.
the program should prompt the user for a ssn and delete that employee from the Employee table (the records from the Technician table and from the Expert table that reference that employee will also be deleted as a result of the ON DELETE CASCADE action)
Upvotes: 0
Views: 110
Reputation: 51190
DELETE FROM Employees WHERE SSN='508-12-1234'
Assuming the Technician and Expert tables have foreign keys set up properly, this should be all you need to do.
Upvotes: 2