求一SQL table struct:c1 c2a 1a 2b 3b 4c 5c 6c 7select结果:c1 c2a 1b 3c 5在c1相同的情况下,c2可以任意值,例如:c1是c,c2可以是5或6或7 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select c1, c2 from table1 where rowid in (select max(c2) from table1 group by c1); 可以参考这个贴类似的问题http://topic.csdn.net/u/20090907/11/b2fa1e4c-613a-44f5-8bdc-2682afc3486f.html?87532 select c1, c2 from table1 where rowid in (select max(rowid) from table1 group by c1); select c1,c2 from (select c1,c2,row_number() over(partition by c1 order by dbms_random.random) rn)where rn = 1; select c1, c2 from table1 where rowid in (select min(rowid) from table1 group by c1 select c1,c2 from(select c1,c2,row_number() over(partition by c1 order by dbms_random.random) rn from tablename)where rn = 1; 数据库中两张表如何建立触发器,使其中一张表某个字段更新时,另一个表的某个字段发生相应的变化?详细如下: 关于恢复 导入数据 求一条关于时间条件的语句 求一条查询语句 老问题,sql语句优化,有点难度,100分诚意奉上 求用一条语句实现对一张表的Insert和Delete处理 奇怪的问题!!!!请高手指教!!!! 求这个问题的解决方案! 我新装的Oraclei 为什么登陆企业管理器用SYSTEM 登陆,会出现“Enable Connect Management Server! 六张表联合查询问题 关于存储过程的问题高手赐教
类似的问题
http://topic.csdn.net/u/20090907/11/b2fa1e4c-613a-44f5-8bdc-2682afc3486f.html?87532
(select c1,c2,row_number() over(partition by c1 order by dbms_random.random) rn)
where rn = 1;
(select c1,c2,row_number() over(partition by c1 order by dbms_random.random) rn from tablename)
where rn = 1;