select identity(int,1,1) as iid,* into #tmp from 表 order by a desc,b desc,c desc,eupdate #tmp set d = iid
select * from #tmp
select * from #tmp
解决方案 »
- 求几条数据中,最小时间的问题?
- 请问两个不同表中赋值的问题
- *****************请教关于sqlserver2005 分区表的问题************************
- 安装VS2005后还用安装SQL Sever2005吗?
- 如何用一句SQL语句实现如下要求?三表关联 (内详)
- dts包关于时间的全局变量问题
- 超时时间已到。SQL 日志中大量出现 Login failed for user 'sa'
- 在sqlserver里的数据转化问题
- 提一个问题,使用什么api函数可以————请进
- 调用函数时遇到的问题,请各位指点
- 求存储过程中的动态sql语句(在线等)
- 求一Sql语句,头痛ing.........
select identity(int,1,1) as iid,* into #tmp from 表 order by a desc,b desc,c desc,eupdate aa set aa.d = bb.iid
from 表 aa
join #tmp bb on aa.a = bb.a and aa.b = bb.b and aa.c = bb.c and aa.e = bb.edrop table #tmp