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
List layers of abstraction microsoft architectured to provide relational db through cloud platform ?
What is standby servers? Explain types of standby servers.
Explain the dirty pages?
what is checksum in sql server.........???
what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration
How to get a list of columns in a view using "sys.columns" in ms sql server?
How do I completely remove sql server instance?
What is a constant or literal in ms sql server?
What is report snapshot?
Why is replication required on the sql server?
Explain the difference between function and stored procedure?
what do you understand by change data capture?
What security features are available for stored procedure?
What have included columns when we talk about sql server indexing?
What do you understand by hotfixes and patches in sql server?