WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR  EXIT FAILURE ROLLBACK;


SPOOL SYS_SESSION_TABLE_HISTORIES.LOG

PROMPT
PROMPT CREATING TABLE SYS_SESSION_TABLE_HISTORIES
PROMPT ============================
PROMPT
WHENEVER SQLERROR CONTINUE
  DROP TABLE SYS_SESSION_TABLE_HISTORIES;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

-- CREATE TABLE
CREATE TABLE SYS_SESSION_TABLE_HISTORIES
(
  TABLE_NAME        VARCHAR2(30) NOT NULL,
  SESSION_FIELD     VARCHAR2(30) NOT NULL,
  FUNCTION_CODE     VARCHAR2(30),
  CREATION_DATE     DATE NOT NULL,
  CREATED_BY        NUMBER NOT NULL,
  LAST_UPDATE_DATE  DATE NOT NULL,
  LAST_UPDATED_BY   NUMBER NOT NULL
);
-- CREATE/RECREATE PRIMARY, UNIQUE AND FOREIGN KEY CONSTRAINTS 
ALTER TABLE SYS_SESSION_TABLE_HISTORIES
  ADD CONSTRAINT SYS_SESSION_TABLE_HISTORIES_PK PRIMARY KEY (TABLE_NAME);


SPOOL OFF


EXIT
