MySQL命令
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)
8 创建索引:ALTER TABLE payment ADD INDEX
SHOW INDEX FROM payment
_serial_index ( payment_serial );payment
;