▣ create immediate 문
SQL> begin
2 execute immediate 'create table xx(x date)';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> desc xx
Name Null? Type
------------------------------------------- -------- ---------------------------------------
X DATE
▶ 테이블 100개 생성
S SCOTT> r
begin
for i in 1..100 loop
execute immediate 'create table tx'||i||'(id number(10),data varchar2(20))';
end loop;
end;
/
댓글 없음:
댓글 쓰기