1.) What is Trigger ?
A trigger is an event that is executed when any condition (statement) is satisfied.
2.) How to prevent' table creation' in database using concept of trigger ?
Create trigger ddl trigger on database
for Create table
as
begin
rollback
Print 'table can not be created'
end
3.) How to view all triggers in your database ?
Select*from sys.triggers
4.) What are the types of triggers in sql server ?
A trigger is an event that is executed when any condition (statement) is satisfied.
2.) How to prevent' table creation' in database using concept of trigger ?
Create trigger ddl trigger on database
for Create table
as
begin
rollback
Print 'table can not be created'
end
3.) How to view all triggers in your database ?
Select*from sys.triggers
4.) What are the types of triggers in sql server ?
- DML (Data Manipulation Language) Triggers
- DDL(Data Definition Language ) Triggers
- Logon Triggers
- CLR Triggers