摘要: update t_borrow set fkid=b.noumber from ( select row_number() over (order by PublishTime asc) as noumber,borrowId from t_borrow ) b where b.Borrow... 阅读全文
posted @ 2015-12-24 10:10 595824023 阅读(214) 评论(0) 推荐(0) 编辑
摘要: sql查询时加上行号sql查询的时候有时候要加上行号,这里做个备忘~1(建议采用),select row_number() over (order by col1) as no,newid() as id,*from Table1order by col12,select no=identity(i... 阅读全文
posted @ 2015-12-24 10:09 595824023 阅读(404) 评论(0) 推荐(0) 编辑