📌  相关文章
📜  如果不存在则创建表 sql 代码示例

📅  最后修改于: 2022-03-11 15:05:32.755000             🧑  作者: Mango

代码示例4
declare
nCount NUMBER;
v_sql LONG;

begin
SELECT count(*) into nCount FROM dba_tables where table_name = 'EMPLOYEE';
IF(nCount <= 0)
THEN
v_sql:='
create table EMPLOYEE
(
ID NUMBER(3),
NAME VARCHAR2(30) NOT NULL
)';
execute immediate v_sql;

END IF;
end;