﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / General / SQL Server 7,2000  / Update Triggers / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 23:23:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Update Triggers</title><link>http://www.sqlservercentral.com/Forums/Topic1421493-9-1.aspx</link><description>If the code you posted was indeed the entire trigger, then yes, that will update the entire table[code="sql"]UPDATE testSET col2 = col1FROM test[/code]Since there's no conditions, no restrictions and nothing to tell SQL otherwise, that's an update of the entire Test table (as it would be if you ran that update anywhere else)If you want to restrict to the rows affected by the operation that fired the trigger, you need to join or filter based on the inserted and/or deleted pseudotables.</description><pubDate>Tue, 19 Feb 2013 02:53:25 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Update Triggers</title><link>http://www.sqlservercentral.com/Forums/Topic1421493-9-1.aspx</link><description>Hi I am trying to create a trigger to store an original ordered qty field when the data is inserted into the table.  We have several different ways of entering orders onto our system so I thought a simple trigger would be a better solution then altering lots of frontend applications.It appears that the trigger is copying all rows from the original field into the field I want to keep a history of the original value.How can I ensure the only row that updates is the row just created, in sql2000?here is my trigger, thanks jasemillyUPDATE test          SET col2 = col1			     FROM test</description><pubDate>Tue, 19 Feb 2013 02:39:05 GMT</pubDate><dc:creator>jason-810420</dc:creator></item></channel></rss>