DB2:FETCH FIRST 1 ROWS ONLY
阿新 • • 發佈:2017-06-08
eno time rac 1.5 image storage src db2 .cn
DB2:FETCH FIRST 1 ROWS ONLY,在Oracle中使用where rownum=1代替 DB2: SELECT INSTORAGENO FROM ( SELECT max(AUDITINGTIME) AUDITINGTIME ,INSTORAGENO FROM T_IN_STOREROOM order by AUDITINGTIME desc FETCH FIRST1 ROWS ONLY ) a Oracle: SELECT INSTORAGENO FROM ( SELECT max(AUDITINGTIME) AUDITINGTIME ,INSTORAGENO FROM T_IN_STOREROOM order by AUDITINGTIME desc ) a where rownum=1
例如:
DB2:FETCH FIRST 1 ROWS ONLY