Home > Database > Mysql Tutorial > MySql中查询表中的列名_MySQL

MySql中查询表中的列名_MySQL

WBOY
Release: 2016-05-30 17:11:13
Original
1215 people have browsed it

例如我的数据库名为“example”,使用

 

USE example;

MySql中查询表中的列名_MySQL

确定使用example数据库。使用

 

 

show tables;

MySql中查询表中的列名_MySQL

 

显示数据库中的所有表。使用

 

 

DESC persons;

MySql中查询表中的列名_MySQL

 

显示表persons中的列名。或者使用

 

 

DESCRIBE persons;

MySql中查询表中的列名_MySQL

 

或者使用

 

 

SHOW columns FROM persons;

MySql中查询表中的列名_MySQL

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template