Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two table:
SQL
CREATE TABLE Lesson
(
lID nchar(4),
lName nvarchar(30)
)
GO

CREATE TABLE SaveLog
(
tblname nvarchar(20),
objID nvarchar(20),
whatDO nvarchar(20),
sysUser nvarchar(20),
theDate datetime
)
GO

I have 1 trigger:
SQL
CREATE TRIGGER InsertTrig
ON Lesson
AFTER INSERT 
AS BEGIN
INSERT INTO SaveLog(what should i write here? pls, help me...)
END

The result I am looking for is:
SQL
INSERT INTO Lesson VALUES('NU01', 'Math')

After
SQL
SELECT * FROM SaveLog

lesson NU01 Inserted as 2012.
Posted
Updated 7-Dec-12 2:38am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900