怎么在SELECT加入一列自增的数据!!! select identity(int,1,1) newid,DD into #temp from tableselect * from #tempdrop table #temp 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 or:alter table table1 add newid int identity(1,1)select * from table1alter table table1 drop column newid select identity(int,1,1) newid,DD into #temp from tableselect * from #temp 不对啊,我要用SELECT 语句!!!!并且不要建表(INTO)!!谢谢好手。可以吗?? 没有办法除非你有主键列:select (select sum(1) from 表 where 主键<aa.主键) 编号,* from 表 aa select (select sum(1) from 表 where 主键<aa.主键) 编号,* from 表 aa大力的方法可行,不过要看你的数据量的,还有表必须有唯一性索引 其实真的需要的话,就alter table加一个identity属性列好了 SQL select 语句问题 无法绑定由多个部分组成的标识符 求一条简单的sql语句???? 再问个交叉表的问题! 两个表合并数据 求解 新手上路,附加数据库出错,小问题请帮忙。 select问题请帮助!!! 关于主从表的问题,我要得到这样的效果:01,02,03 各位大哥,问下,SQL Server 2000 升级的问题!!!请来帮帮我这个小菜鸟吧!!!先谢谢了!!! 在SQL2000中,写存储过程怎么实现时间比当前时间大3个小时则执行一个SQL语句? 如何编程ms sql server 2000 查询某个表的所有触发器名称,拥有者及类型? 怎样通过存储过程返回一个表?
select * from table1
alter table table1 drop column newid
select * from #temp