只更新一筆資料

只更新一筆資料

 

當有重覆的時候可用
SET ROWCOUNT 1
GO
UPDATE table_name
set field_1 = GETDATE()
WHERE field_2 = 'Y'