13.7.7.39 SHOW TABLES Statement

Official document address: 13.7.7.39 SHOW TABLES Statement


SHOW [EXTENDED] [FULL] TABLES
    [{
   
   FROM | IN} db_name]
    [LIKE 'pattern' | WHERE expr]

SHOW TABLESList the non-temporary tables in the given database. You can also use the mysqlshow db_namecommand to get this list. If there is a LIKEclause, it indicates which table names to match. You can also use WHEREclauses to select rows using more general conditions, as discussed in 26.55 SHOW Statement Extension .

LIKEThe matching performed by the clause depends on lower_case_table_namesthe setting of the system variable.

The optional EXTENDEDmodifier causes the hidden table created by the SHOW TABLESfailed ALTER TABLEstatement to be listed . The names of these temporary tables #sqlstart with, and you can use DROP TABLEthem to delete them.

This statement can also list any view in the database. The optional FULLmodifier causes the SHOW TABLESsecond output column to be displayed, with values ​​including BASE TABLE(representing a table), VIEW(representing a view), SYSTEM VIEW(representing a INFORMATION_SCHEMA table).

If you do not have permission to view the base table or view, it will not be displayed in the output of SHOW TABLESor mysqlshow db_name.

You can also INFORMATION_SCHEMA TABLESget table information from the table. See 26.38 INFORMATION_SCHEMA TABLES table .

Guess you like

Origin blog.csdn.net/wb1046329430/article/details/115035726