IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_SNMAINFILE' AND KSQL_COL_NAME ='FRELEASEBILLID') 
 ALTER TABLE T_BD_SNMAINFILE ADD (FRELEASEBILLID BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_SNMAINFILE' AND KSQL_COL_NAME ='FRELEASEBILLEID') 
 ALTER TABLE T_BD_SNMAINFILE ADD (FRELEASEBILLEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_SNMAINFILE' AND KSQL_COL_NAME ='FRELEASEENTRYTYPE') 
 ALTER TABLE T_BD_SNMAINFILE ADD (FRELEASEENTRYTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_SNMAINFILE' AND KSQL_COL_NAME ='FRELEASEBILLTYPE') 
 ALTER TABLE T_BD_SNMAINFILE ADD (FRELEASEBILLTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );