麻烦大家解决一下这个sql~~~ select 表1.id, 表1.name ,max(表2.h) from where 表1.id=表2.id group by 表2.h 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我觉得应该是这样select 表1.id, 表1.name ,max(表2.h) from where 表1.id=表2.id group by 表1.id, 表1.name select id,name,(select max(h) from 表2 where id=表1.id) h from 表1 select t1.id,t1.name,t2.max_h from 表1 t1,select max(h) max_h from 表2 group by id) t2 where t1.id=t2.id; sorryselect t1.id,t1.name,t2.max_h from 表1 t1,(select id,max(h) max_h from 表2 group by id) t2 where t1.id=t2.id; 楼上丢as 了select t1.id,t1.name,t2.max_h from 表1 t1,(select id,max(h) as max_h from 表2 group by id) t2 where t1.id=t2.id; 不好意思,我想错了,上二楼的是对的,没有asselect t1.id,t1.name,t2.max_h from 表1 t1,(select id,max(h) max_h from 表2 group by id) t2 where t1.id=t2.id; oracle XE 插入记录慢的问题 oracle 10g到底需不需要人工手动进行表分析? 请教:刚装了oracle不太会用,想倒一个数据文件到数据库里,怎么做?谢谢!!! 请问oracle查询语句流程怎样?where后面是一次性判断吗? 问个Oracle内存设置的问题。 时间差函数如何写 安装Oracle9i到100%时出错! 数据库记录被别人错误修改,已有一段时间,我从v$log_history中查出修改之前的时间,如何回滚?请教 散分!祝oracle区的各位兄弟姐妹们圣诞快乐! Oracle 数据类型的问题!在线等! 有人遇到这种问题吗?
select 表1.id, 表1.name ,max(表2.h) from where 表1.id=表2.id group by 表1.id, 表1.name
select t1.id,t1.name,t2.max_h from 表1 t1,(select id,max(h) max_h from 表2 group by id) t2 where t1.id=t2.id;
select t1.id,t1.name,t2.max_h from 表1 t1,(select id,max(h) as max_h from 表2 group by id) t2 where t1.id=t2.id;
select t1.id,t1.name,t2.max_h from 表1 t1,(select id,max(h) max_h from 表2 group by id) t2 where t1.id=t2.id;