oracle查詢最大值?
oracle sql查詢時取最大值實現(xiàn)例句如下:
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