Several basic commands of MySQL database and table

Are you having a hard time getting your hands on 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 databases and tables. The following is a specific description of the relevant content.
 
SELECT DATABASE(); List the currently selected database, or NULL if no database is selected;
SHOW DATABASES; List MySQL databases currently existing on the server;
USE databasename; select access to a database;
SHOW tables; find out what tables the current MySQL database contains ;
DESCRIBE tablename; list the structure of a table;
SHOW INDEX FROM tablename; Displays index information in the table.
 
  The above related content is an introduction to the most basic commands of MySQL database and table, I hope you can gain something.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326406492&siteId=291194637