Obsidian/Recognition/Programing/Tibero/테이블 생성 프로시저.md

20 lines
378 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
``` sql
CREATE OR REPLACE PROCEDURE PRO_CRE(v_name varchar2)
IS
cursor1 INTEGER;
credbsql VARCHAR2(100);
BEGIN
credbsql := 'CREATE TABLE ' || v_name || ' (abc number, bac varchar2(10))';
-- 테이블 생성
cursor1 := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cursor1, credbsql, dbms_sql.v7);
DBMS_SQL.CLOSE_CURSOR(cursor1);
END;
/
```