[英]oracle query to fetch the last 4 records from the table
我有一個名為employee的表,其中有幾個作業在后台運行,將數據插入到表中,請告知查詢,我可以通過該查詢從表中獲取的最后4條記錄,我正在使用oracle作為數據庫。
您可以像這樣使用子查詢
select * from ( select * from tableName order by id desc ) where ROWNUM <= 4;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.