SELECT * FROM (SELECT * FROM TABLE_NAME ORDER BY COL1) WHERE ROWNUM = 1;
备注:
1、不能给 (SELECT * FROM TABLE_NAME ORDER BY COL1)加别名,会提示无效;
2、只能取第一行,取其他行取不了,比如ROWNUM = 2等就取不了;
3、据说数据量大了会存在效率问题。
以上备注有待研究
SELECT * FROM (SELECT * FROM TABLE_NAME ORDER BY COL1) WHERE ROWNUM = 1;
备注:
1、不能给 (SELECT * FROM TABLE_NAME ORDER BY COL1)加别名,会提示无效;
2、只能取第一行,取其他行取不了,比如ROWNUM = 2等就取不了;
3、据说数据量大了会存在效率问题。
以上备注有待研究