You have previously seen SHOW DATABASES, which lists the databases managed by the server. To find out which database is currently selected, use the DATABASE() function: The name of the column in the output produced by this statement is always Tables_in_db_name, where db_name is the name of the database. See Section 12.5.5.34, "SHOW TABLES Syntax", for more information.
If you want to find out about the structure of a table, the DESCRIBE command is useful; it displays information about each of a table's columns:
View Complete Post