Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-06-10 : 08:12:20
|
| krishna writes "Hi TeamMembersI have a questions, pls answer this one.What is difference between constraints and Triger? Why one should use triggers when we have constraints at column level.regardskrishna" |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-06-10 : 19:55:45
|
| Krishna, A constraint is a condition that is enforced by SQL Server. You can use it to ensure integrity of your data. A trigger is a command/statement that you can run on a given event(delete record, update, insert etc). This can be used to enforce more complex constraints, or can simply be used to perform some action (such as writing to an audit table) when a record is changed/added/removed.HTH,Tim |
 |
|
|
|
|
|