表的建表脚本如下:
create table TBL_CN_CHARGE
(
TRADE_ID NUMBER,
MONEYNUMBER,
PHONEVARCHAR2(12),
ST NUMBER,
SC_NUMBERVARCHAR2(12),
INTIME DATE,
CHARGETIME DATE
);
利用存储过程完成以下功能:
1.查询语句select * from TBL_CN_CHARGE where st=1and rownum select * from test;
C1
C2
--------------------------------------- ---------------------------------------
1
1
2
2
2
2
2
2
3
3
3
2
6 rows selected
SQL>
SQL> declare
2type l_c2 is table of test.c2%type;
3my_c2 l_c2;
4begin
5 update test set c1=100 where c2=2 and rownum select * from test;
C1
C2
--------------------------------------- ---------------------------------------
1
1
100
2
100
2
2
2
3
3
3
2
6 rows selected
.
[/php] |