Example
--Submit once for each processing of 10,000 articles
Loop
INSERT INTO T2
SELECT * from t1 where rownum <= 10000; --Insert 10,000 bars at a time
Delete from T1 where rownum <= 10000; --Delete 10,000 bars at a time
V_rowcount: = Sql%rowcount;
Commit
Exit when V_rowcount < 10000; --If the number of submissions is less than 10000, the description is last processed
End Loop;
Additional sql% four description of properties
The Sql%notfound--update,delete operation did not find a record that met the criteria.
Sql%found--select columnname into, Update,delete find the top of the record that matches the condition
Sql%rowcount--Determine the number of current update records
Sql%isopen--Determines whether the current cursor is open
This article is from "Richard's notes-accumulate micro Cheng" blog, please be sure to keep this source http://zxf261.blog.51cto.com/701797/751314
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/