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

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

WBOY
WBOYOriginal
2016-06-01 13:52:24838browse

  SELECT DATABASE();

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

  SHOW DATABASES;

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

  USE databasename;

  选择访问某个数据库;  

  SHOW tables;

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

  DESCRIBE tablename;

  列出一个表的结构;

  SHOW INDEX FROM 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