What is the Diff b/w Constraints and Trigeer

Answers were Sorted based on User's Feedback



What is the Diff b/w Constraints and Trigeer..

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

What is the Diff b/w Constraints and Trigeer..

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

What is the Diff b/w Constraints and Trigeer..

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

What is the Diff b/w Constraints and Trigeer..

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

Post New Answer

More SQL PLSQL Interview Questions

What is normalization? How many normalization forms are there?

0 Answers  


What are the different set operators available in sql?

0 Answers  


what is query cache in mysql? : Sql dba

0 Answers  


What is the different between Stored Procedure and Procedure?

7 Answers   Informatica, MIS,


What is sql profiling in oracle?

0 Answers  






Name some usages of database trigger?

0 Answers  


What is Difference Between Unique and Primary Key Constraints?

0 Answers   Wipro,


What is the purpose of the partition table?

0 Answers  


What is the left table in sql?

0 Answers  


Define implicit and explicit cursors.

0 Answers  


Question: Below is the table city gender name delhi male a delhi female b mumbai male c mumbai female d delhi male e I want the o/p as follows: male female delhi 2 1 mumbai 1 1 Please help me in writing the query that can yield the o/p mentioned above?

2 Answers  


How can we debug in PL/SQL?

0 Answers  


Categories