- 论坛徽章:
- 0
|
下面的代码
set serveroutput on size 1000000
set pagesize 5000
set lines 200
set heading off
set feedback off
Declare Cursor c_Cur Is
Select Msisdn, Content
From Rm1_Sms_Send_Log
Where Send_Date Is Null
For Update Of Send_Date;
v_Msisdn Varchar2(20);
v_Content Varchar2(4000);
Begin
Open c_Cur;
Loop
Exit When c_Cur%Notfound;
Fetch c_Cur
Into v_Msisdn, v_Content;
Dbms_Output.Put_Line(v_Msisdn || ',' || v_Content);
Update Rm1_Sms_Send_Log Set Send_Date = Sysdate Where Current Of c_Cur;
End Loop;
Close c_Cur;
Commit;
Exception When Others Then
Dbms_Output.Put_Line(Sqlerrm);
Close c_Cur;
End;
无论是否有数据更新都会报ORA-01410: invalid ROWID,且输出结果比我的实际数据量多一行(最后一行被重复输出),为什么?
谢谢 |
|