ALTER PROCEDURE dbo.ModeratorSpamDeleteThread
@ThreadsID INT
AS
DELETE Threads
WHERE ThreadsID=@ThreadsID
I have got this..But it tells me that i cant delete the table cause it is connected to another table by foreign key..
So I need to do this too:
@ThreadsID INT
AS
DELETE Comments
WHERE ThreadsID=@ThreadsID
The question is how do i Combine both stamtents into one?