IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PERM_ROLEPERMDETIAL' AND KSQL_COL_NAME IN ('FROLEID')) 
 ALTER TABLE T_PERM_ROLEPERMDETIAL ADD (FROLEID VARCHAR(18) DEFAULT ' ' NOT NULL );
 