CREATE TABLE IF NOT EXISTS
> CREATE TABLE IF NOT EXISTS TEAMS
> (TEAMNO INTEGER NOT NULL PRIMARY KEY,
> EmployeeNO INTEGER NOT NULL,
> DIVISION CHAR(6) NOT NULL);
CREATE TABLE IF NOT EXISTS Companies (
id int,
name varchar(50),
address text,
email varchar(50),
phone varchar(10)
);
create table if not exists schema_uploadfile.tbl_uploadfile(
id serial primary key,
file_name varchar(255) unique,
file_type varchar(30),
grp_data bytea
);
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;