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

What programs use sql?

0 Answers  


what is cursor procedure

1 Answers   iGate,


What are sql indexes?

0 Answers  


What are instead of triggers?

0 Answers  


there are 2 variables called x and y ,x contains 1,2 and y contains 3,4 we have to swap the values from x to y and y to x with out using dummy variables and it can be done only by using a single statement ? how?

12 Answers   Oracle,






how can i read files from a pl/sq l program

3 Answers  


How do you truncate?

0 Answers  


How can I create a table from another table without copying any values from the old table?

8 Answers  


what is foreign key? : Sql dba

0 Answers  


How can we make an if statement within a select statement?

0 Answers  


What are types of indexes in sql?

0 Answers  


How do you modify a column in sql?

0 Answers  


Categories