Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.71 KB | None | 0 0
  1. USE CeilInn4;
  2. GO
  3.  
  4. --========================================================
  5. --Database :    CeilInn4
  6. --DML Trigger : RecordInsertion
  7. --Description : This trigger updates the DatabaseOperations
  8. --              by letting it know that a new record was
  9. --              added to the Rooms table. The trigger
  10. --              specifies the name of the employee
  11. --              who performed the operation and the time
  12. --              this occurred
  13. --========================================================
  14.  
  15. CREATE TRIGGER RecordInsertion
  16. ON Rooms
  17. AFTER INSERT
  18. AS
  19. BEGIN
  20.     INSERT INTO DatabaseOperations
  21. VALUES(N'Table', N'Rooms', SUSER_SNAME(),
  22.        N'Created a new record', GETDATE())
  23. END
  24. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement