/**Begin D:\PDM_UPGRADE\PDM1\EB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_EXAMINEPLAN') 
 CREATE TABLE T_EB_EXAMINEPLAN (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FMODIFIER BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FCREATEORG BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FMODIFYDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_EXAMINEPLANFYEAR') 
 CREATE TABLE T_EB_EXAMINEPLANFYEAR (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_EXAMINEPLANORG') 
 CREATE TABLE T_EB_EXAMINEPLANORG (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_EXAMINEPLANPERIOD') 
 CREATE TABLE T_EB_EXAMINEPLANPERIOD (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_EXAMINEPLANVERSION') 
 CREATE TABLE T_EB_EXAMINEPLANVERSION (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_PLANREFEXAMINE') 
 CREATE TABLE T_EB_PLANREFEXAMINE (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FEXAMINENUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXAMINENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FEXAMINESTATUS CHAR(1) DEFAULT '0' NOT NULL,
FSEQ INT DEFAULT 1 NOT NULL,
FEXAMINEID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\EB_table.sql **/
