Tuesday, August 19, 2008

DDL TRIGGER

CREATE TRIGGER safety
ON DATABASE
FOR DROP_TABLE, ALTER_TABLE
AS
PRINT 'You must disable Trigger "safety" to drop or alter tables!'
ROLLBACK ;
---------------------------
create table mytable
(
id int,
nam char(10)
)
---------------------------
drop table mytable
---------------------------
drop trigger safety on database
-----------------------------
drop table mytable

No comments: