What are Triggers and Rules?

Answer Posted / rajendra prasad reddy penumall

these two are SQL concepts

TRigger is a special type of stored procedure that
automatically takes effect when the data in a specified
table is modified.
triggers invoked in response to an INSERT,UPDATE OR DELETE
STATEMENT EXECUTED.
TRIGGERS are used to handle some exceptional conditions
if u r moving data 40 MB into data base,But data base having
only 30 mB free space then the trigger fires automatically
and the entire transaction automativcally roll backs.

Rules:
Rules are database objects used to enforce data integrity.
this object bound to column or userdefined data types.
to ensure that only valid values are allowed to insert in
to columns.

so trigger acts automatically nad rollbacks the transaction
when error is occured.

rule is used to enforce data integrity on a column or user
defined data type.

are you clear if you want any clarification please mail to
me.

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you test a gas to see if it was hydrogen?

834


Which element has the following ground-state electron configuration: 1s22s22p6?

830


Is dna organic?

757


What are all the base services provided by the os in client server environment?

814


How do you solve ideal gas law problems?

858


Tell me what is load balancing?

748


Why do some medications contain hcl?

824


What is the full form of hcl?

824


Convert 673 kelvin into degrees centigrade?

809


What are general middleware in client server environment?

809


What is the chemical formula for dichromate?

838


Which are not carbonate minerals?

772


Do all explosions produce carbon dioxide?

821


Long chains of amino acids are linked together through what type of bond?

776


Are the chemical properties of lithium a metal metalloid or a nonmetal?

759