What is the Diff b/w Constraints and Trigeer
Answers were Sorted based on User's Feedback
Answer / saraswathi muthuraman
TO apply business rule we are using Constraints and trigger.
If we have any computation and validation over the
calculated value we have choose "trigger".
Direct validation like the column should not contain null
values then you can choose Constraints.
Constraints : NOT NULL,UNIQUE,PRIMARY KEY,CHECK,REFERENCE
Trigger effected only those row after which trigger applied
but constraint effected all row of table .
Is This Answer Correct ? | 24 Yes | 0 No |
Answer / mohanbabu
Constraints are used to limit the type of data that can go
into a table.
Constraints can be specified when a table is created or
after the table is created.
A trigger is a fragment of code that you tell Oracle to run
before or after table is modified.
Is This Answer Correct ? | 13 Yes | 3 No |
Answer / shekar
Triggers: It checks the condition and Performs some action
eg: it checks and fires before or after insert or update
or delete
Constriants: it checks the condition
eg: suppose NotNull constraint.It jst doesn't allow null
values.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / manoranan sethy
Constraints are restrict the invalid data before invoke into the database whereas trigger restrict the invalid transaction.
Is This Answer Correct ? | 1 Yes | 0 No |
Can we create view in stored procedure?
How can I see all tables in sql?
How will you a activate/deactivate integrity constraints?
How many times can we commit in a loop?
What is difference between function and trigger?
What is normalization and types of normalization?
22 Answers Etisbew, F-TEC, Microsoft, TechProcess,
What are stored procedures used for?
What is the difference between numeric and autonumber?
What is a constraint? Tell me about its various levels.
how to add a new column to an existing table in mysql? : Sql dba
what is 'mysqlimport'? : Sql dba
How can we store rows in PL/SQL using array?