/**Begin  **/

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_CENTRALAPPMUTEX') 
 CREATE TABLE T_EB_CENTRALAPPMUTEX (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNODENUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNODENAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSCHEMES NVARCHAR(2000) DEFAULT ' ' NOT NULL,
FAPPROVERID BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_CENTRALAPPMUTEX' AND KSQL_COL_NAME ='FUNIQUEKEY')
ALTER TABLE T_EB_CENTRALAPPMUTEX ADD (FUNIQUEKEY NVARCHAR(50) DEFAULT ' ' NOT NULL);

/**End **/