mysql: select: select * from information_schema.Columns where table_name='表名' #查询表的各个属性 select column_comment,column_name,data_type,is_nullable,column_type,numeric_precision,numeric_scale ,column_default from information_schema.Columns where table_name='表名' #查询表的 字段名字,字段注释 , 数据类型 ,是否可以为空 ,字段类型,数值精度,小数点数, 列morenzhi select * from information_schema.tables 查询表信息 select table_name,table_comment from information_schema.tables 查询表 表名 ,表注释 select table_name,table_comment from information_schema.tables where table_name like '%表名%' 模糊匹配相应的表 SELECT count(*) TABLES, table_schema FROM information_schema.TABLES where table_schema = '表名' GROUP BY table_schema; 查询数据库表总数量 edite: alter table 表明 add 字段名 decimal(18,2) 给表增加一个字段 删除表的一个字段 alter table 表名 modify 字段名 decimal(18,2) 修改表的一个字段 |
|
来自: 涅槃沉殇 > 《mysql 实用操作》