Y2S1-Database_Design/SQL/queries/DML/query 3.sql
2020-06-07 22:29:59 +01:00

17 lines
394 B
Transact-SQL

CREATE PROCEDURE RemoveMediaEntry @EntryID integer
AS
DELETE FROM ImageEntry
WHERE EntryID = @EntryID;
DELETE FROM AudioEntry
WHERE EntryID = @EntryID;
DELETE FROM VideoEntry
WHERE EntryID = @EntryID;
DELETE FROM Thumbnail
WHERE EntryID = @EntryID;
DELETE FROM Comment
WHERE PageID = @EntryID;
DELETE FROM ContentPage
WHERE PageID = @EntryID;
DELETE FROM MediaEntry
WHERE EntryID = @EntryID;
GO