Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between trigger and constraint?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a recursive stored procedure?

1174


Explain lock escalation? : Transact sql

1192


What is difference sql and mysql?

978


What is scalar function?

1047


how to analyze tables with 'mysqlcheck'? : Sql dba

1011


Show code of a cursor for loop.

1052


what is a field in a database ? : Sql dba

1053


What is the difference between nested table and varray?

998


Explain the select statement in sql?

1107


What are variables in pl sql?

1161


Is hadoop a nosql?

996


What is the cause of mutating table error and how can we solve it?

1047


What is primary and foreign key?

1058


What is the use of non clustered index?

988


What is data types in sql?

1005