mysql 命令行
1. 获取外键连接信息
# get foreign key SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA IS not null and table_schema='db name';
2. 清空表
truncate <table name>
3. update时一定要加limit