Hello,
I want to select all columns within a table on an update trigger but I can't figure out how to select more than 1? Anybody help?
CREATE TRIGGER [AGE] ON [Employees]
FOR INSERT, UPDATE
AS
declare @tempage datetime
declare @tempemp varchar(30)
declare @tempstring varchar(50)
if update (????)
BEGIN select @tempage = (select * from Inserted)
begin
select @tempemp = (Select FirstName from Inserted)
select @tempstring = 'Mail notification of an update using atrigger - tony' + @tempemp
exec master.dbo.xp_sendmail
'tony.whitwell@decorpart.co.uk' ,@tempstring
end
end
I want to select all columns within a table on an update trigger but I can't figure out how to select more than 1? Anybody help?
CREATE TRIGGER [AGE] ON [Employees]
FOR INSERT, UPDATE
AS
declare @tempage datetime
declare @tempemp varchar(30)
declare @tempstring varchar(50)
if update (????)
BEGIN select @tempage = (select * from Inserted)
begin
select @tempemp = (Select FirstName from Inserted)
select @tempstring = 'Mail notification of an update using atrigger - tony' + @tempemp
exec master.dbo.xp_sendmail
'tony.whitwell@decorpart.co.uk' ,@tempstring
end
end