/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_LEAFBIZRULETEMPDIS') 
 CREATE TABLE T_EB_LEAFBIZRULETEMPDIS (
FID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATE BIGINT DEFAULT 0 NOT NULL,
FBIZRULE BIGINT DEFAULT 0 NOT NULL
);

 EXEC P_ALTERPK 'PK_T_EB_LEAFBIZRULETEMPDIS', 'T_EB_LEAFBIZRULETEMPDIS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_LEAFRULETEMPDIS') CREATE INDEX IDX_EB_LEAFRULETEMPDIS ON T_EB_LEAFBIZRULETEMPDIS ( FTEMPLATE );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
