/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCTB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_ORG_GROUP_PARAM') 
 CREATE TABLE T_TCTB_ORG_GROUP_PARAM (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FDECLARE VARCHAR(50) DEFAULT ' ' NOT NULL,
FYBXMHWBL DECIMAL(23,10) DEFAULT 0 NOT NULL,
FJZJTHWBL DECIMAL(23,10) DEFAULT 0 NOT NULL,
FYBXMYSBL DECIMAL(23,10) DEFAULT 0 NOT NULL,
FJZJTYSBL DECIMAL(23,10) DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_ORG_GROUP' AND KSQL_COL_NAME ='FFPXSSRFW') 
 ALTER TABLE T_TCTB_ORG_GROUP ADD (FFPXSSRFW VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_ORG_GROUP' AND KSQL_COL_NAME ='FYBTSEHFFS') 
 ALTER TABLE T_TCTB_ORG_GROUP ADD (FYBTSEHFFS VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_ORG_GROUP' AND KSQL_COL_NAME ='FZFJGSEFPFS') 
 ALTER TABLE T_TCTB_ORG_GROUP ADD (FZFJGSEFPFS VARCHAR(50) DEFAULT ' ' NOT NULL );

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