A
A
Alexey Dabalaev2016-12-27 21:06:40
Oracle
Alexey Dabalaev, 2016-12-27 21:06:40

Hierarchical queries. Value generation. How to use INSERT INTO.... query?

Hello.
Guys, tell me how to insert values ​​into a table in a loop ?

"Write" a simple loop for output - I figured it out. But for the insert - no way ..

SELECT rownum as rn FROM dual
CONNECT BY level <= 100;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2016-12-28
@Dronablo

INSERT INTO MYTAB(ID)
SELECT LEVEL FROM DUAL CONNECT BY LEVEL<=100;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question