Home  >  Article  >  Backend Development  >  php mysql中这种如何查

php mysql中这种如何查

WBOY
WBOYOriginal
2016-06-13 12:15:46746browse

php mysql中这种怎么查
前提:有一个字段名为abc的在数据库中某张表里,但是忘了该表叫啥名了,并且数据库里有几百张表,不可能一个一个的找吧,所以这时需求来了
如何快速找出这个字段所在的表呢
------解决思路----------------------
如果你的数据库是在MYSQL 5.0之后的版本可以通过information_schema库来实现:

use information_schema;
select * from columns where column_name='查找字段名' ;

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