
CREATE TABLE TB_FILE
(
	FILE_KEY	  VARCHAR2(20)  NOT NULL ,
	FILE_CTGRY	  VARCHAR2(10)  NOT NULL ,
	FILE_NM		  VARCHAR2(100)  NOT NULL ,
	FILE_PATH	  VARCHAR2(255)  NOT NULL ,
	FILE_SIZE	  NUMBER  NULL ,
	FILE_AT		  CHAR(1)   DEFAULT  'T' NOT NULL,
	FILE_TY		  VARCHAR2(100)  NULL ,
	FILE_CREAT_DE	  VARCHAR2(14)  NULL ,
	CREAT_DT	  DATE  NOT NULL ,
	CRTR		  VARCHAR2(100)  NOT NULL ,
	UPDT_DT		  DATE  NOT NULL ,
	UPDUSR		  VARCHAR2(100)  NOT NULL
);

CREATE UNIQUE INDEX XPKTB_FILE ON TB_FILE
(FILE_KEY  ASC,FILE_CTGRY  ASC);

ALTER TABLE TB_FILE
	ADD CONSTRAINT  XPKTB_FILE PRIMARY KEY (FILE_KEY,FILE_CTGRY);

ALTER TABLE TB_FILE MODIFY creat_dt DEFAULT SYSDATE;

ALTER TABLE TB_FILE MODIFY updt_dt DEFAULT SYSDATE;
