查看Mysql表结构的命令
以下是最常用的
desc 表名; show columns from 表名; describe 表名; show create table 表名; use information_schema select * from columns where table_name='表名'; show databases; use 数据库名; show tables;
以下是次常用的
--执行以下sql修改索引 alter table tb_webparamcounter drop index AK_PAS_Name; alter table tb_webparamcounter add UNIQUE AK_PAS_Name(PC_ID,PAC_Name);