-- 部署毎出納データ drop table if exists DepartmentCostData cascade; CREATE TABLE DepartmentCostData( DepartmentCode DECIMAL (5, 0) UNSIGNED NOT NULL COMMENT '部署コード' , DataYear SMALLINT (5) UNSIGNED NOT NULL COMMENT '工事期数・工事年数' , DataCount DECIMAL (5, 0) UNSIGNED NOT NULL COMMENT 'データ番号' , EntryPersonCode DECIMAL (8, 0) UNSIGNED NOT NULL COMMENT '入力担当者コード' , SuppliersCode DECIMAL (5, 0) UNSIGNED NOT NULL COMMENT '支払先コード' , SuppliersName VARCHAR (120) COMMENT '支払先名称' , PaymentContent VARCHAR (60) COMMENT '支払内容' , DateOfBilling DATE NOT NULL COMMENT '請求日' , DateOfPayment DATE NOT NULL COMMENT '支払日' , EntryPrice DECIMAL (12, 0) NOT NULL COMMENT '金額(税抜)' , EntryPriceInTax DECIMAL (12, 0) NOT NULL COMMENT '金額(税込)' , SlipNumber VARCHAR (12) COMMENT '伝票番号' , ComplateFlg DECIMAL (1, 0) NOT NULL COMMENT '引込済みフラグ' , ApprovalFlg DECIMAL (1, 0) NOT NULL COMMENT '承認フラグ' , EntryDate DATETIME NOT NULL COMMENT '登録日付' , UpdateDate DATETIME NOT NULL COMMENT '更新日付' , CONSTRAINT DepartmentCostData_PKC PRIMARY KEY (DepartmentCode, DataYear, DataCount) ) COMMENT '部署毎出納データ';