Home >Database >Mysql Tutorial >mysql查询某个表的所有字段_MySQL

mysql查询某个表的所有字段_MySQL

WBOY
WBOYOriginal
2016-06-01 13:10:15947browse

SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='databaseName' AND TABLE_NAME='tableName'

将databaseName替换为所使用的数据库名
将tableName替换为所使用的表名

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