http://blog.csdn.net/ningoo/archive/2005/01/07/244503.aspx
解决方案 »
- 求一SQL
- sql2000的作业为何一直不自动运行?
- 会员表,会员约会表,如何以约见次数作为查询条件,列出会员ID,username???
- 突然连不上远程sql2000数据库了
- 在安装SQL Server200企业版时出现这样的问题,请问是怎么回事呢?
- MS SQL 表与 ORACLE 表 研究疑惑
- 求一条两表联合查询最小值的SQL语句,谢谢!
- 关于调用存储过程的问题,传递多个查询条件
- 请问DELPHI编写使用SQL SERVER 2000的管理端用什么连接好点?
- 怎样自定义字符串型自增加字段?
- 请问:设置两数据表级联更新和修改后要想更新非主从键字段如何处理?
- select时为什么会报连接占线错误
up
delete from tt where exists(select * from tt a where a.id>tt.id group by col1,col2 and tt.col1=a.col1 and tt.col2=a.col2)
alter table tt drop column id
insert t1(a,b)
select 'aa','bb'
union all select 'a1','bgb'
union all select 'aa','bb'
union all select 'a2','bb'
union all select 'aa3','beeb'
union all select 'aa','bb'
union all select 'a2','bb'delete t1
where id not in
(select min(id) as id from t1 group by a,b)select * from t1drop table t1/*
id a b
------------------
0 aa bb
1 a1 bgb
3 a2 bb
4 aa3 beeb*/