When i creating a trigger shows errorThe above one is doing in sql server 2008
Tblaudit as follows
i am creating a trigger whenever record inserted in the tblemployeedetails, in tblaudit record will be inserted. for that i am creating a trigger as follows.
create triggger tbl_insert_foremployee
declare @id int
select @id = id from inserted
insert into Tblauditdata
values ('New employee with id = ' + cast(@id as varchar(5)) +
'is added at ' + cast(Getdate() as nvarchar(20)))
when i execute the above trigger shows error as follows
Unknown object type 'triggger' used in a CREATE, DROP, or ALTER statement.
please help me what is the mistake i made.