Stored Procedures: insert 1000 records cyclically, and 1000 stored procedures
PS: Today, Brazil is abused again. I dreamed it was and woke up.
Mysql> delimiter $ mysql> create procedure p3 ()-> modifies SQL data-> BEGIN-> set @ I = 0;-> set @ max = 100; -> while @ I <@ max do-> insert into user values (@ I);-> set @ I = @ I + 1;-> end while; -> end $
80 thousand records are inserted cyclically in the oracle stored procedure using FORLOOP. After running, it is found that ORACLE is stuck but the records have been correctly written.
It is generally used in China. Our company's DBA 80% has no certification. What is important is technology and experience.
Even if you want to take the test after a year and a half, you will not be able to take the test.
Still hard to find
How can 100 records be inserted cyclically in the SQL database? Is stored procedure required?
Declare @ a as int
Set @ a = 1
While (@ a <= 100)
Begin
Insert into table1 values ('','','','')
Set @ a = @ a + 1
If @ a> 100
Break
Else
Continue
End