update outbound.notification
set statuscode = 1
select * from outbound.Notification
where statuscode = 4 --not in (3,6)
and convert(varchar,createdtimestamp,102) > '2015.01.10'
and OutboundID <> 647
执行上述查询。意思是将选择注释掉,以便我可以在选择该状态的查询和更新它们之间交替。我对哪些行做了什么?
答案 0 :(得分:3)
您更新了outbound.Notification
的所有行。您的查询通常是两个单独的查询。
首先,这会更新outbound.Notification
的所有行:
update outbound.notification set statuscode = 1
其次,这只是一个SELECT
声明。
select * from outbound.Notification
where statuscode = 4 --not in (3,6)
and convert(varchar,createdtimestamp,102) > '2015.01.10'
and OutboundID <> 647