一.表的状态查询 (1)如果发现一个数据异常的大了,需要查看一下其中哪些表变大了,可以使用如下命令 SQL> SHOW TABLE STATUS FROM 数据库名 LIKE 数据表名; 或者 SQL>select table_name,data_length from information_schema.tables; 如果表太小,可使用ALTER TABLE调整: SQL>ALTER TABLE tbl_name MAX_ROWS=1000000000 AVG_ROW_L…
建表语句,带自增字段 create table test ( id int auto_increment primary key, name ) not null, password ) not null ); MySQL数据库修改id字段自增 alter table table_name modify column col_name int auto_increment; 显示表结构方法: desc table_name; describe table_name; show columns f…