Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Create a dynamic table
CREATE OR REPLACE PROCEDURE createdynamictable IS BEGIN FOR n IN 1 .. 100 LOOP dbms_output.put_line('1'); execute immediate 'DROP TABLE Persons_'||n; execute immediate 'CREATE TABLE Persons_'||n||'(PersonID NUMBER(3) PRIMARY KEY,Name varchar(20),Address varchar(20),City varchar(20))'; execute immediate 'INSERT INTO Persons_'||n||' (PersonID,Name,Address,City) VALUES (1,'''''Rahul'''',''''Marine Drive''''','''''Mumbai''''')'; END LOOP; END createdynamictable; SELECT * FROM dba_tables\\ INSERT INTO Persons_1 (PersonID,Name,Address,City) VALUES (1,'Rahul','Marine Drive','Mumbai')\\ SELECT * FROM Persons_1\\
run
|
edit
|
history
|
help
1
Srinivas
alle angemeldeten Benutzer können eine gegebene aktion ausgeben
Connect by - delimiter
Srinivas
Srinivas
Srinivas
emp
a
display table 5 for using for loop
mr