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 are functions and procedures called in PL/SQL?

0 Answers  


What is difference sql and mysql?

0 Answers  


Difference between views and materialized views?

5 Answers   BirlaSoft,


What is before trigger?

0 Answers  


Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table has 100 records after table created.Now i nee to change id's Datatype is to be Varchar2(15). now Alter table emp modify(id varchar2(15),name varchar2(20), salary number(9,2)); Whether it will work or returns error? post answer with explanation.

13 Answers   Oracle, TCS,






Can we use ddl commands in pl sql?

0 Answers  


How can you know that statistics should be updated?

0 Answers  


Which are the different character-manipulation functions in sql?

0 Answers  


what will be the output: select 1 from emp union all select 2 from emp;

2 Answers   iNautix,


i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this

0 Answers  


what is the Default Libraries for Oracle Report 6i

0 Answers   IBM,


What is integrity constraints?

5 Answers   Ramco, Satyam,


Categories