--解法一
select identity(int,1,1) as 序号,* into #t from 表
select * from #t
--解法二
alter table 表 add 序号 int identity(1,1)
select * from 表
alter table 表 drop column line
select identity(int,1,1) as 序号,* into #t from 表
select * from #t
--解法二
alter table 表 add 序号 int identity(1,1)
select * from 表
alter table 表 drop column line
解决方案 »
- 一个存储过程的错误.
- 如何方便的将数据库中的某字段中所含有的某字符串全部换掉
- 问一个sql语句的问题
- SQL select :关于SQL子查询 的一个问题
- 在成绩表中查找排名第十的人???
- BULK INSERT 产生的错误没有赋值给@@error ?
- 在sql2000中有没有好的调试触发器的工具,是什么?
- text字段如何转换成image字段??
- 急!1.如何在组合框内添加数据项...
- sql server 7.0中怎样生成自己想要的唯一编号
- 使用“存储过程”和“使用SQL语句”的区别?
- 怎么样测试conn(conn.asp)是否可以连通数据库而且如果conn有错的话也不会卡死机导致需要重启??在线等!!!
select (select count(*) from table1 where name<=a.name )id ,name from table1 a order by id