Home > Database > Mysql Tutorial > A comprehensive review of the most basic commands for MySQL databases and tables

A comprehensive review of the most basic commands for MySQL databases and tables

黄舟
Release: 2017-02-18 11:27:13
Original
1331 people have browsed it

[Introduction] Do you have a headache in obtaining the actual operation of the most basic commands for MySQL databases and tables? If this is the case, the following article will give you the corresponding solution. The following article mainly introduces the solution to obtain the most basic commands about MySQL database and tables. The following is the relevant content

Are you right? Are you having a headache getting the actual operation of the most basic commands for MySQL databases and tables? If this is the case, the following article will give you the corresponding solution. The following article mainly introduces the solution for obtaining the most basic commands about MySQL database and tables. The following is a detailed description of the relevant content.

SELECT DATABASE(); List the currently selected database, if no database is selected, NULL will be displayed;

SHOW DATABASES; List the MySQL currently existing on the server Database;

USE databasename; Select to access a database;

SHOW tables; Find out what tables the current MySQL database contains;

DESCRIBE tablename; List a table Structure;

SHOW INDEX FROM tablename; Displays index information in the table.

The above is an inventory of the most basic commands for MySQL databases and tables. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


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