CREATE TRIGGER dbo InsertNigger ON Profiles AFTER INSERT AS PRINT Inse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CREATE TRIGGER dbo.[InsertNigger]
ON Profiles
AFTER INSERT
AS
PRINT 'Inserted'
GO
CREATE TRIGGER dbo.[UpdateNigger]
ON Profiles
AFTER UPDATE
AS
PRINT 'Updated'
GO
DROP TRIGGER dbo.[DeleteNigger]
GO
CREATE TRIGGER dbo.[DeleteNigger]
ON Profiles
INSTEAD OF DELETE
AS
BEGIN
IF (SELECT COUNT(*) FROM deleted WHERE ProfileName!='ROGER') > 0
RAISERROR('%s', 0, 1, 'Columns were not deleted')
DELETE FROM
END;
GO