表结构如下:name total hit
a b 23
a b 32
c f 5
..........现在要求如下:输出
name totalname和total组合不能重复a b
a c
a sf
a fsf
b b
b afa
b sdfsf
.......
a b 23
a b 32
c f 5
..........现在要求如下:输出
name totalname和total组合不能重复a b
a c
a sf
a fsf
b b
b afa
b sdfsf
.......
解决方案 »
- 重复数据过滤,一条SQL语句
- 求一多表连接的存储过程
- SQL Express如何将数据同步到SQL Server数据库上?
- 动态创建触发器出现了问题 救命
- 客户端无法访问域服务器的SQL服务器
- select查询问题?
- 求一个随机取数据的sql,详情要求请见内容
- 呵呵,win server 2003 的sqlserver 2000(sp3)终于连上了,感谢pengdali,请近来接分!
- 正在使用的商业软件(只有可执行程序),用户向某表插入数据,如何在插入前进行修改?
- 哪位知道怎么加全角空格?急!
- 2|13|12|7|16 ,如何把有2的记录查出来
- 麻烦哪位 帮我把这句 修改到 可以在 SQL2005下运行 且有相同结果:)
group by name total
insert into tbl select 'a','b',23
union all select 'a','b',32
union all select 'c','f',5
union all select 'c','f',4
select * from tblselect distinct name,total from tbl drop table tb
--------------------
a b
c f