2009年9月2日 星期三

用 Trigger 寫 Table log (Insert,update,delete) 的簡單範例

CREATE TRIGGER [tri_TABLE1_INS] ON [TABLE1]
FOR INSERT
AS
INSERT INTO TABLE1_LOG
SELECT 'INS', GETDATE(), * FROM INSERTED
GO

CREATE TRIGGER [tri_TABLE1_UPD] ON [TABLE1]
FOR UPDATE
AS
INSERT INTO TABLE1_LOG
SELECT 'UPD', GETDATE(), * FROM INSERTED
GO

CREATE TRIGGER [tri_TABLE1_DEL] ON [TABLE1]
FOR DELETE
AS
INSERT INTO TABLE1_LOG
SELECT 'DEL', GETDATE(), * FROM DELETED
GO

微軟證明考試折扣又來了

Get up to 25% off Select Microsoft Certification Exams

December 31, 2009 or while supplies last. Customers must register, schedule and take their discounted exams by December 31, 2009.

詳細資訊與取得申請:
http://www.prometric.com/microsoft/careeroffer