See what database
SHOW databases;
Which is used to view the current database, if no database, NULL is returned.
Note: bracketed behind, which is a build in function.
SELECT DATABASE();
Use a database
USE DB_Name;
What a view inside the database table
SHOW tables;
View table structure, that is, there are tables of data types which fields, field ...
The following is a list of pet names.
DESCRIBE pet;
Or abbreviated
DESC pet;
or
SHOW COLUMNS FROM pet;
Describle tableName and SHOW the COLUMNS the FROM tableName, the effect is the same.
Only list information table in a column
DESC tableName columnName;
Reference documentation, MySQL official website: