Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Create table if not exist

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;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Create #table #exist
ADD COMMENT
Topic
Name
4+8 =