create table product(
code varchar(8) not null primary key,
supplier_code varchar(5) not null,
classification_code varchar(6) not null,
location_code varchar(6) not null,
warehouse_code varchar(3) not null,
use_flag enum('Y','N') default 'Y' not null,
name varchar(200) not null,
safety_inventory int not null,
price int not null,
expiration_dt datetime null,
created_dt datetime not null,
created_manager varchar(100) not null,
manager varchar(100) not null,
updated_dt datetime not null,
memo text null
);
상품테이블
create table product( code varchar(8) not null primary key, supplier_code varchar(5) not null, classification_code varchar(6) not null, location_code varchar(6) not null, warehouse_code varchar(3) not null, use_flag enum('Y','N') default 'Y' not null, name varchar(200) not null, safety_inventory int not null, price int not null, expiration_dt datetime null, created_dt datetime not null, created_manager varchar(100) not null, manager varchar(100) not null, updated_dt datetime not null, memo text null );
FOREIGN KEY (location_code) REFERENCES location(code), FOREIGN KEY (warehouse_code) REFERENCES warehouse(code), FOREIGN KEY (classification_code) REFERENCES category(code)