 EXEC p_AlterColumn 'T_BCM_USERSELECT', 'FAPPLICATION', 'VARCHAR(4)', 'NOT NULL', '0100', ''' ''';


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_INVELIMTEMPLATE_L' AND KSQL_COL_NAME IN ('FNAME')) 
 ALTER TABLE T_BCM_INVELIMTEMPLATE_L ADD (FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INVCHANGEACCTSET') 
 CREATE TABLE T_BCM_INVCHANGEACCTSET (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FACCOUNTID BIGINT DEFAULT 0 NOT NULL
);


 --- drop TABLE --------- 请认真检查该脚本 ------------------- 
IF EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_INVCHANGEACCTSETTING') 
 DROP TABLE T_BCM_INVCHANGEACCTSETTING;