what is the difference between trigger and constraint?

Answers were Sorted based on User's Feedback



what is the difference between trigger and constraint?..

Answer / kumar jabu

Constraints implements specific conduct or rules on table column like it determines whether field data should be unique,not null ..
But triiger implements rules on systems or application event.
whenever dml occurs that implemented rules been fired.

Is This Answer Correct ?    3 Yes 0 No

what is the difference between trigger and constraint?..

Answer / naga sindhuri

Triggers not apply for existing rows but constraints can
apply for existing rows.

Is This Answer Correct ?    2 Yes 0 No

what is the difference between trigger and constraint?..

Answer / milind chopde

1) Constraints can be used for validation but trigger can be used for complex validation and auditing purpose.
2) Trigger is database object but constraint not.
3) Trigger can be fired on DDL commands but constraints are created or altered using DDL commands.
4) Trigger can be fired on particular event like before/after DML but constraint always check before any data insert or update to table.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

0 Answers  


what are the advantages of cursors than procedures?

2 Answers  


Can we commit inside a trigger?

0 Answers  


What is the difference between an inner and outer join?

0 Answers  


can a stored procedure call itself or recursive stored procedure? : Sql dba

0 Answers  






What is INSTEAD OF trigger ?

13 Answers   Hexaware, TCS,


What is the difference between CHAR and VARCHAR2? If VARCHAR2 serves the uses of CHAR why CHAR is still used and not been discarded yet?

9 Answers   Oracle,


What is a pl/sql block?

0 Answers  


a procedure one in two out parameters i am waiting it in a sql query can i get the output

1 Answers  


I have a procedure in a procedure. The inner procedure contains out parameter. How I can call the inner procedure in the out procedure and send the inner procedure parameter value(out parameter value) into out procedure?

2 Answers  


When is the explicit cursor used ?

0 Answers  


what is sub-query? : Transact sql

0 Answers  


Categories