查询指定表的列名:select column_name from information_schema.columns where table_schema='databaseName' and table_name='tableName'
默认结尾添加列:ALTER TABLE 'tableName' ADD '列名' VARCHAR( 100 ) NOT NULL ;
查询出来的数据不重复:distinct
查询所有的表名:select * from information_schema.tables 数据库名:select TABLE_SCHEMA from information_schema.tables
表名:select TABLE_NAME from information_schema.tables
指定数据库:SELECT TABLE_NAME FROM information_schema.tables where TABLE_SCHEMA ='xhs'
?>