Answer Posted / mallika
Triggers are the system generated events.
for example,
u have a table emp,in tat u can create a trigger which will
be activated if anyone performs any action such as insert,
update, delete on tat table.In tat trigger u can write code
which copies the updated info into another table.
we can provide security to the data by mentioning before
clause in tat trigger by which we can restrict the
modifications anyone can make to our table.
CREATE TRIGGER DelhiDel ON [Customers]
FOR DELETE
AS
IF (SELECT state FROM deleted) = ‘Delhi’
BEGIN
PRINT ‘Can not remove customers from Delhi’
PRINT ‘Transaction has been canceled’
ROOLBACK
END
| Is This Answer Correct ? | 46 Yes | 5 No |
Post New Answer View All Answers
What is the latest version of microsoft sql server?
What is unique key constraint?
What is a select query statement in ms sql server?
Does sql server use t sql?
Tell me what is sql profiler?
Why main is user defined function?
how to create “alternate row colour”?
Do I need a report server to run reports in my application?
what is the difference between openrowset and openquery?
What is difference between oltp and olap?
How can you insert values in multiple rows using one Insert statement?
What are the different ways you can create databases in sql server?
Name and describe few console utilities for ssrs?
What happens when the SQL Azure database reaches Max Size?
What are the difference between data mart and data warehouse? : sql server analysis services, ssas