SQL Select WHERE row updated
-
30-10-2019 - |
Question
USE [RF_WORLD]
GO
/****** Object: Trigger [dbo].[lastdeathtrigg] Script Date: 08/20/2012 10:52:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: Mauro Tamm
-- =============================================
ALTER TRIGGER [dbo].[lastdeathtrigg]
ON [dbo].[tbl_pvporderview]
AFTER UPDATE
AS
IF (UPDATE(Death))
BEGIN
SET NOCOUNT ON;
DECLARE @userserial int;
SELECT @userserial ='serial' WHERE UPDATE(Death)
Insert INTO [RF_WORLD].[dbo].[lastdeath]
(serial)
VALUES (@userserial)
END
The where part is suspicious, woudl it work like that? essentially i need it to only select the row serial value if it actually updated.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange