Wednesday, September 28, 2011

my first TRIGGER ever sql-server

ALTER

TRIGGER testTRIGGER

ON

dbo.QTD_HOURS1

FOR

INSERT

AS

BEGIN

insert

into QTD_HOURS1Trg

select

a.* from QTD_HOURS1 a

left

outer join QTD_HOURS1Trg b on a.[column 0]=b.[column 0] and a.[column 1]=b.[column 1]

where

b.[column 0] is null

END


No comments: