-- 公式平台函数分类适用应用表
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_FTTYPEAPPSCOPE')
 CREATE TABLE T_HRCS_FTTYPEAPPSCOPE (
	FPKID BIGINT DEFAULT 0 NOT NULL,
    FID BIGINT DEFAULT 0 NOT NULL,
    FBASEDATAID VARCHAR(50) DEFAULT ' ' NOT NULL
);
-- create primary key
EXEC p_AlterPK 'PK_HRCS_FTTYPEAPPSCOPE', 'T_HRCS_FTTYPEAPPSCOPE', 'FPKID', '1';
-- create index
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_FTTYPEAPPSCOPE') CREATE INDEX IDX_HRCS_FTTYPEAPPSCOPE ON T_HRCS_FTTYPEAPPSCOPE ( FID );

-- comment
--comment on table T_HRCS_FTTYPEAPPSCOPE is '公式平台函数分类适用应用表';
--comment on column T_HRCS_FTTYPEAPPSCOPE.FPKID is '主键';
--comment on column T_HRCS_FTTYPEAPPSCOPE.FID is '关联表T_HRCS_FUNCTIONTYPE主键FID';
--comment on column T_HRCS_FTTYPEAPPSCOPE.FBASEDATAID is '适用应用ID';