1 连接mysql命令:mysql -u root -p
2 查看存储引擎: show engines;
3 显示database:show databases;
4 连接database:use db01;
5 显示表信息:show create table payment;
6 直接指定存储引擎:create table table(id int) engine=innoDB;
7 创建外键:ALTER TABLE payment ADD CONSTRAINT product_id_fk FOREIGN KEY(product_id) REFERENCES product(product_id)
标签:product,show,mysql,命令,MySQL,table,id From: https://www.cnblogs.com/ningshare/p/16951684.html