SQL select ename,sal from (select * from emp order by sal desc) where rownum=a;
網(wǎng)站建設(shè)哪家好,找創(chuàng)新互聯(lián)建站!專注于網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、微信平臺小程序開發(fā)、集團企業(yè)網(wǎng)站建設(shè)等服務(wù)項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了興城免費建站歡迎大家使用!
輸入 a 的值: 2
原值 1: select ename,sal from (select * from emp order by sal desc) where rownum=a
新值 1: select ename,sal from (select * from emp order by sal desc) where rownum=2
ENAME SAL
---------- ----------
KING 5000
SCOTT 3000
SQL /
輸入 a 的值: 3
原值 1: select ename,sal from (select * from emp order by sal desc) where rownum=a
新值 1: select ename,sal from (select * from emp order by sal desc) where rownum=3
ENAME SAL
---------- ----------
KING 5000
SCOTT 3000
FORD 3000
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
連接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL show parameter open_cursors;
NAME TYPE VALUE
------------------------------------ ----------- -------------------
open_cursors integer 3002、查看當前打開的游標數(shù)目
SQL select count(*) from v$open_cursor;
COUNT(*)
----------174943、修改Oracle最大游標數(shù)
SQL alter system set open_cursors=1000 scope=both;
系統(tǒng)已更改。
聲明游標時寫好SELECT語句,如
CURSOR r_cur1 IS select *** from tableName where 條件;
使用時
OPEN r_cur1;
LOOP
FETCH *** INTO variable;
EXIT WHEN r_cur1%NOTFOUND OR r_cur1%NOTFOUND IS NULL;
甲骨文股份有限公司(NASDAQ:ORCL,Oracle)是全球大型數(shù)據(jù)庫軟件公司??偛课挥诿绹又菁t木城的紅木岸(Redwood Shores),現(xiàn)時首席執(zhí)行官為公司創(chuàng)辦人勞倫斯·埃里森(Lawrence J. Ellison)。