时间:2021-07-01 10:21:17 帮助过:27人阅读
简单的mysql数据操作
01mysql -uroot -pgc723227502show tables03desc tablename04alter table add fieldname fieldtype05alter table table1 add id int unsigned not Null auto_increment primary key06alter table TN chang oldfieldname newfieldname fieletyep null or not null07alter table TN modify fieldname fieletyep null or not null08alter table TN drop filename0910alter table TN add index index_name(column...)11alter table TN add unique index_name(column)1213alter table TN add primary index_name(column...)1415ALTER TABLE tbl_name DROP INDEX index_name (column list);16ALTER TABLE tbl_name DROP UNIQUE index_name (column list);17ALTER TABLE tbl_name DROP PRIMARY KEY index_name (column list);18REPAIR TABLE tbl_name QUICK;19SHOW INDEX FROM tbl_name;