what is the difference between trigger and constraint?
Answers were Sorted based on User's Feedback
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 |
Answer / naga sindhuri
Triggers not apply for existing rows but constraints can
apply for existing rows.
Is This Answer Correct ? | 2 Yes | 0 No |
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 |
How are functions and procedures called in PL/SQL?
What is difference sql and mysql?
Difference between views and materialized views?
What is before trigger?
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.
Can we use ddl commands in pl sql?
How can you know that statistics should be updated?
Which are the different character-manipulation functions in sql?
what will be the output: select 1 from emp union all select 2 from emp;
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
what is the Default Libraries for Oracle Report 6i
What is integrity constraints?