Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
trigger when a specific column gets updated
trigger when a specific column gets updated
Rate Topic
Display Mode
Topic Options
Author
Message
Minnu
Minnu
Posted Wednesday, December 05, 2012 3:21 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 8:34 AM
Points: 138,
Visits: 411
Hi Team,
It's my first time to use triggers so Is there a way to create a trigger when a specific column gets
updated or inserted (not the whole table)?
Post #1392880
anthony.green
anthony.green
Posted Wednesday, December 05, 2012 3:35 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
Same as this topic
http://www.sqlservercentral.com/Forums/Topic1392869-391-1.aspx
Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1
&
Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger
Post #1392886
DiverKas
DiverKas
Posted Wednesday, December 05, 2012 6:32 AM
SSC Veteran
Group: General Forum Members
Last Login: Today @ 1:38 PM
Points: 243,
Visits: 427
Minnu,
Please stop posting the same question worded differently multiple times. It wont get an answer any faster.
Post #1392974
Jeff Moden
Jeff Moden
Posted Wednesday, December 05, 2012 7:40 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 9:01 PM
Points: 33,111,
Visits: 27,037
Minnu (12/5/2012)
Hi Team,
It's my first time to use triggers so....?
So... From SSMS, press the F1 key to get into Books Online. Then search for CREATE TRIGGER and start reading. I'm not being sarcastic here. If it's truly your first time, take the opportunity to teach yourself all about triggers so you won't have to ask such questions in the future. To really do it right, create a test database and some tables to practice writting triggers on so you can actually see what they do.
Triggers can be quite the tripping point in code and if you don't have a very firm grasp on what they actually do and how they work and how to use them, you're going to make some really huge and embarassing mistakes.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1393007
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.