对于某一列相同的数据我只想得到第一条?? 用PL/SQL编写过程,然后在程序中调用,看看可以吗。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用SQL语句就可以得到这样的记录。select * from (select * from table1 group by A) order by Awhere rownum=1你试试。如果要在程序里面返回这个数据集,就需要使用游标了。 使用子查询吧:select A,B from ( select A,B,row_number() over(patition by A order by B) as id from table)where id=1(注意:row_number()函数816以上版本支持) select * from tablename where rowid in (select Min(rowid) from tablename group by a) ; Oracle调用SqlServer函数 数据库自动备份代码如何写 oracle 删除表问题 想把col之类的页面设置放到config中是哪个文件? oracle 定义存储过程 怎样让参数非空? 求个统计数据sql查询语句 ORACLE用户权限问题 数组应用,如何将 (1,2,3,4)分别提取出来 sql语句查询重复的值,帮忙! Access denied for user 'gxp'@'localhost' (using password: NO) 100分求救 :我在VB中使用ADO连接Oralce数据库时...(在线等待) 问一个很弱智的问题
select * from (select * from table1 group by A) order by A
where rownum=1你试试。
如果要在程序里面返回这个数据集,就需要使用游标了。
select A,B,row_number() over(patition by A order by B) as id from table
)
where id=1
(注意:row_number()函数816以上版本支持)