1CREATE TABLE IF NOT EXISTS
2
3> CREATE TABLE IF NOT EXISTS TEAMS
4> (TEAMNO INTEGER NOT NULL PRIMARY KEY,
5> EmployeeNO INTEGER NOT NULL,
6> DIVISION CHAR(6) NOT NULL);
7
1DECLARE -- Oracle
2 existing_table number;
3BEGIN
4 SELECT count(*) into existing_table FROM ALL_TABLES
5 WHERE TABLE_NAME = 'table_name' AND OWNER = 'owner';
6 IF existing_table = 1 then
7 EXECUTE IMMEDIATE 'DROP TABLE owner.table_name';
8 END IF;
9END;
10/
11CREATE TABLE owner.table_name (BDAY DATE, [...]);