oracle查询最大值?
oracle sql查询时取最大值实现例句如下:
1、SELECT a.* FROM table1 a WHERE NOT EXISTS (SELECT 1 FROM table1 b WHERE b.id>a.id)
2、select * from table, (select name,max(value) value from table group by name) a where table.name=a.name and table.value=a.value