create table price_log(
id int not null auto_increment primary key,
product_id int unsigned not null,
price decimal(10,2),
create_time timestamp not null default current_timestamp,
update_time timestamp not null default current_timestamp on update current_timestamp,
foreign key(product_id) references product(product_id) on delete cascade on update cascade
);
标签:product,记录表,创建,update,current,修改,timestamp,null,id From: https://blog.51cto.com/u_16030624/7629618