CREATE TABLE product_info(
product_id VARCHAR(32) NOT NULL,
product_name VARCHAR(64) NOT NULL COMMENT ‘商品名称’,
product_price DECIMAL(8,2) NOT NULL COMMENT ‘单价’,
product_stock INT NOT NULL COMMENT ‘库存’,
product_description VARCHAR(64) COMMENT ‘描述’,
product_icon VARCHAR(512) COMMENT ‘小图’,
category_type INT NOT NULL COMMENT ‘类目编号’,
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ‘创建时间’,
update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
COMMENT ‘更新时间’,
PRIMARY KEY (product_id)
)COMMENT ‘商品表’;
登录后可查看更多问答,登录/注册