[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)!