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 |
wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure
what are the types of subquery? : Sql dba
How to display Row Number with Records in Oracle SQL Plus?
What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?
how to include numeric values in sql statements? : Sql dba
What steps server process has to take to execute an update statement?
how to sort records in sql?
When is the update_statistics command used?
If a View on a single base table is manipulated will the changes be reflected on the base table?
What is sql mysql pl sql oracle?
Does sql*plus also have a pl/sql engine?
Is it possible to Restore a Dropped Table using Rollback Command in Oracle SQL Plus ?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)