mysql 第一条记录问题 怎么取出 每个诊室(tab_zs) 里面的tab_jhxh 值最小的一行记录 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 haoma zs1 1诊室2 3诊室4 1诊室5 2诊室3 1诊室查询出来 每个诊室 haoma最小的一行我想要的结果haoma zs1 1诊室5 2诊室2 3诊室 select * from tt where not exists(select 1 from tt where a.zs=zs and a.haoma>haoma) 参考下贴中的多种方法http://topic.csdn.net/u/20091231/16/2f268740-391e-40f2-a15e-f243b2c925ab.html[征集]分组取最大N条记录方法征集,及散分.... a 是什么意思 这里就一个表啊 select 1 from tt 这个有什么用 上面少写了1个A,表别名select * from tt A where not exists(select 1 from tt where a.zs=zs and a.haoma>haoma)建议你看看SQL的基础知识 select min(haoma) from 表明 group by zs select id,risk from tb a where id in (select min(id) from tb b where b.risk = a.risk); 储存过程写在哪里? linux s5下mysql的默认安装路径在那里? My sql 存储过程中使用光标出错???? 求九百万行数据表优化 通过odbc连接局域网内mysql服务器出错 我安装了mysql for win2000可是 怎么建库啊,不想想象中的access,sql server ,oracle那样简单? ASP如何使用MSSQL mysql删除重复记录 关于字段设置为号码段内自动增长的问题 2张表能否搞定描述标签 求助! 关于GROUP BY语句的优化 libmysql 连接 mysql 使用mysql_query内存泄露的问题
1 1诊室
2 3诊室
4 1诊室
5 2诊室
3 1诊室查询出来 每个诊室 haoma最小的一行我想要的结果
haoma zs
1 1诊室
5 2诊室
2 3诊室
[征集]分组取最大N条记录方法征集,及散分....
select 1 from tt 这个有什么用
select * from tt A where not exists(select 1 from tt where a.zs=zs and a.haoma>haoma)
建议你看看SQL的基础知识