SQL查询中表的数据如图一 查询a列中数据一样的,然后保留第一行,删除掉重复的。效果图如2

[复制链接]
查看11 | 回复3 | 2013-1-15 13:21:17 | 显示全部楼层 |阅读模式
一样,改成select,去掉notselect * from tb where exists(select 1 from tb as a where a.a=tb.a and group by a.ahaving min(a.c)=tb.c)...
回复

使用道具 举报

千问 | 2013-1-15 13:21:17 | 显示全部楼层
select * from tab where tab.rowid int(select max(rowid) from tab group by a;...
回复

使用道具 举报

千问 | 2013-1-15 13:21:17 | 显示全部楼层
selectdicount(*) from table as s...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行