Y2S1-Database_Design/SQL/queries/DML/query 3.sql

17 lines
394 B
MySQL
Raw Normal View History

2020-06-07 21:29:59 +00:00
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