select identity(int,1,1) id,kh,lx into t2 from table1 where lx = 1
go
select * from t2同理....
go
select * from t2同理....
解决方案 »
- 根据条件查出一些结果后,如何判断这些数据里有重复的数据?并提取出这些重复的数据和重复数据本身?
- SQL2005远程连接问题:未找到提供程序。该程序可能未正确安装。
- 请教一个简单的存储过程参数使用
- xp 如何打开1433端口
- delete问题?
- 求一个第三方的SQL-Server的客户端
- SQL 批量修改数据库字段类型
- 问关于 视图 的问题,麻烦大家相助!
- java application调用数据库问题
- ms-sql DTS是否可以直接从DB2取数据
- 建立表之间的关系有什么用处?用outer join 和inner join 不够吗?
- DELETE 语句与 COLUMN REFERENCE 约束
1楼的:
select identity(int,1,1) id,kh,lx into t2 from table1 where lx = 1
select * from t2
drop table t22楼的:select id=identity(int,1,1),* into #t from table1 where lx = 1select * from #tdrop table #t