Home  >  Article  >  Database  >  mysql中查询某个相同字段的表集合_MySQL

mysql中查询某个相同字段的表集合_MySQL

WBOY
WBOYOriginal
2016-06-01 13:38:43948browse

bitsCN.com


mysql中查询某个相同字段的表集合

 

1  在查询窗口中输入: 

Java代码  

SELECT   TABLE_NAME  FROM   INFORMATION_SCHEMA.COLUMNS  

WHERE   COLUMN_NAME   =   'int1' group by TABLE_NAME;  

就可以查找到含有字段名为int1的所有表名; 

 

2  再在查询窗口中输入: 

Java代码  

desc 查询到的表名;  

 

就可查找到该表中的所有字段名.

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