|
|
|
|
| |
The '%' character used here is a special wildcard character that is described later in the "Pattern Matching" section. Similar restrictions can be used with DESCRIBE and EXPLAIN as well; for the exact syntax, see Appendix D, "SQL Syntax Reference."
The SHOW statement has other forms that are useful for obtaining different types of information from MySQL. SHOW TABLES lists the tables in the current database, so with the two tables we've created so far in the sampdb database, the output looks like this:
mysql> SHOW TABLES;
SHOW DATABASES lists the databases that are managed by the server to which you're connected:
mysql> SHOW DATABASES;
The list of databases varies from server to server, but you should see at least sampdb and mysql. You created sampdb yourself, and the database named mysql holds the grant tables that control MySQL access privileges.
The mysqlshow utility provides a command-line interface to the same kinds of information that the SHOW statement displays. With no arguments, mysqlshow displays a list of databases:
% mysqlshow
With a database name, it shows the tables in the given database:
% mysqlshow sampdb
Database: sampdb
With a database and table name, mysqlshow displays information about the columns in the table, much like the SHOW COLUMNS statement.
|
|
|
|
|
|
| Link Partners: Asia florist, Flowers to India, Hong kong flowers, Site submit, Cheap web hosting, China florist, Japan florist |
|