关于SQL数据库的自动计数问题 select identity(int,1,1) as NID,* into #temp from 表名drop table 表名select * into 表名 from #tempdrop table #temp 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select idd=identity(int,1,1),* into #t from 表名 where 条件--将你需要的数据存入一个临时表中,并给该表加了一个自动增长的ID,select * from #t where idd=N--通过这个ID来,选择你想要的. 用一個自動增量函數就行了。identity(int,1,1)不過這個要結合虛擬表一起用哦select identity(int,1,1) as [id],* into #temp from tablename where 条件 SQL Server定时作业执行失败 存储过程中创建视图的问题!! ntext长度不够怎么办 在SQL中函数调用函数的问题? 菜鸟请教一个触发器的问题 sql 购找一个函数来合并一列中相同行 修改syslogins表,急急 ASP循环存储过程,提示“连接占线导致另一个 hstmt” 请问如何通过SQL查询一个数据库中所有表的名称? 如何获取主板号 急请问 怎么知道表'AA'中是否存在一个约束 ? 如果存在就删除它,再新建一个约束,用SQL语句怎么实现?? 请问sql中表是视图有什么区别!
select idd=identity(int,1,1),* into #t from 表名 where 条件
--将你需要的数据存入一个临时表中,并给该表加了一个自动增长的ID,select * from #t where idd=N
--通过这个ID来,选择你想要的.
identity(int,1,1)不過這個要結合虛擬表一起用哦
select identity(int,1,1) as [id],* into #temp from tablename where 条件