Home  >  Article  >  Database  >  Basic commands for MySQL databases and tables

Basic commands for MySQL databases and tables

巴扎黑
巴扎黑Original
2017-03-19 10:36:411042browse

[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 related content is an introduction to some of the most basic commands for MySQL databases and tables. I hope you can gain something.

The above is the detailed content of Basic commands for MySQL databases and tables. For more information, please follow other related articles on the PHP Chinese website!

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