Home > Database > Mysql Tutorial > body text

Mysql关于数据库和表的几个最基本命令_MySQL

WBOY
Release: 2016-06-01 13:52:24
Original
783 people have browsed it

  SELECT DATABASE();

  列出当前所选择的数据库,如果未选择数据库则显示NULL;

  SHOW DATABASES;

  列出服务器上当前存在的数据库;

  USE databasename;

  选择访问某个数据库;  

  SHOW tables;

  找出当前的数据库包含什么表;  

  DESCRIBE tablename;

  列出一个表的结构;

  SHOW INDEX FROM tablename;

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!