阅读448 返回首页    go 阿里云 go 技术社区[云栖]


查询MySql数据库架构信息:数据库,表,表字段

/*1.查询所有数据库*/
show databases; 

/*2.查询所有数据表*/
select * from information_schema.tables where table_schema='world'

/*3.查询指定表的所有字段*/
select * from information_schema.columns 
where table_schema='world'
and table_name='city' 

最后更新:2017-04-03 15:21:43

  上一篇:go hdu 4707 Pet 水
  下一篇:go TDD测试驱动的javascript开发(3) ------ javascript的继承