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 maximum size per database for sql server express?
What is the standby server?
Which operator do you use to return all of the rows from one query except rows are returned in a second query?
What are the types of table?
What is the difference between clustered index and primary key?
What encryption security is available in sql azure?
What is a heap?
What do you do in data exploration
What are the types of user defined functions in sql server?
between cast and convert which function would you prefer and why?
What information is maintained within the msdb database?
What do you mean by an execution plan?
What number sorts of privileges are accessible in sql?
What does COMMIT command do?
What are the differences between stored procedure and the dynamic sql?