Home  >  Article  >  Database  >  简单的mysql数据操作_MySQL

简单的mysql数据操作_MySQL

WBOY
WBOYOriginal
2016-06-01 13:30:361132browse

bitsCN.com

简单的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;

 


bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn