This thing is very interesting, first try on the table, then in the table, then circulate record

xiaoxiao2021-03-06  15

Declare

Num number (12): = 0;

Begin

Begin

Execute Immediate

'Drop Table TB1';

EXCEPTION

WHEN

Others

THEN

NULL;

END;

Execute Immediate

'Create Table TB1 (

AA Number,

BB Number) ';

For Num in Select * from TB1 LOOP

INSERT INTO TB1 (AA, BB) VALUES (NUM, NUM);

End loop;

COMMIT;

END;

转载请注明原文地址:https://www.9cbs.com/read-46056.html

New Post(0)