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

SPOOL SYS_MAIL_SERVER.log

PROMPT
PROMPT CREATING TABLE SYS_MAIL_SERVER
PROMPT ============================
PROMPT
WHENEVER SQLERROR CONTINUE
DROP TABLE SYS_MAIL_SERVER;
WHENEVER SQLERROR EXIT FAILURE ROLLBACK
-- CREATE TABLE
CREATE TABLE SYS_MAIL_SERVER
(
  MAIL_SERVER_ID   NUMBER not null,
  MAIL_SMTP_HOST   VARCHAR2(100) not null,
  MAIL_PROTOCOL    VARCHAR2(30) not null,
  MAIL_PORT_NUMBER NUMBER not null,
	MAIL_ADDRESS     VARCHAR2(100) not null,
  AUTH_LOGIN_FLAG  VARCHAR2(1) default 'Y' not null,
  MAIL_USERNAME    VARCHAR2(100),
  MAIL_PASSWORD    VARCHAR2(100),
  DISPLAY_NAME     VARCHAR2(100),
  REPLY_TO         VARCHAR2(100),
  MAIL_SIGNATURE   VARCHAR2(2000),
  ENABLED_FLAG     VARCHAR2(1) default 'Y' not null,
  DEFAULT_FLAG		 VARCHAR2(1) default 'N' not null,
  CREATED_BY       NUMBER not null,
  CREATION_DATE    DATE not null,
  LAST_UPDATED_BY  NUMBER not null,
  LAST_UPDATE_DATE DATE not null
);
-- CREATE/RECREATE PRIMARY, UNIQUE AND FOREIGN KEY CONSTRAINTS 
ALTER TABLE SYS_MAIL_SERVER
  ADD CONSTRAINT SYS_MAIL_SERVER_PK PRIMARY KEY (MAIL_SERVER_ID);

  
SPOOL OFF
EXIT