Blog that contains articles about new technologies related or not with programming.
I will describe and solves some problems that I encounter in my career.
ASP .NET, AJAX, Javascript, C++, C# and SQL are some of the subjects that will appear.
20 August 2013
Update alternate rows in sqlserver
update s set recstatus=’I’ from (select row_number() over (order by id) sno,* from mastertbl)s where sno%2=0
or
with c as ( select row_number() over (order by id) sno,* from mastertbl ) update c set recstatus=’I’ where sno%2=0
No comments:
Post a Comment