for insert
AS
if ((select ord_date from inserted)
rollback tran
end
-- Kiem tra trigger
Insert into dbo.sales values ('6380', '0001', '10/01/2006', 10, 'Net 6','BU1032' )
2. Create trigger UpdatetitleAdvance on dbo.titles
for update
AS
if ((select advance from inserted)>15000)
begin
print 'Advance khong the lon hon 15000'
rollback tran
end
-- Kiem tra trigger
update dbo.titles set advance=20000 where title_id='BU1032'
3. sp_helptext InsertSales
4. Alter trigger UpdatetitleAdvance on dbo.titles with encryption
for update
AS
if ((select advance from inserted)>15000)
begin
print 'Advance khong the lon hon 15000'
rollback tran
end
Nuk ka komente:
Posto një koment