Name
SHOW
Synopsis
SHOW DATABASES [LIKEclause
] SHOW KEYS FROMtable
[FROMdatabase
] SHOW INDEX FROMtable
[FROMdatabase
] SHOW TABLES [FROMdatabase
] [LIKEclause
] SHOW COLUMNS FROMtable
[FROMdatabase
] [LIKEclause
] SHOW FIELDS FROMtable
[FROMdatabase
] [LIKEclause
] SHOW STATUS SHOW TABLE STATUS [FROMdatabase
] [LIKEclause
] SHOW VARIABLES [LIKEclause
]
Displays various information about the MySQL system. This statement can be used to examine the status or structure of almost any part of MySQL.
Examples
# Show the available databases SHOW DATABASES # Display information on the indexes on table 'bigdata' SHOW KEYS FROM bigdata # Display information on the indexes on table 'bigdata' in the database 'mydata' SHOW INDEX FROM bigdata FROM mydata # Show the tables available from the database 'mydata' that begin with the # letter 'z' SHOW TABLES FROM mydata LIKE 'z%' # Display information about the columns on the table 'skates' SHOW COLUMNS FROM stakes # Display information about the columns on the table 'people' that end with # '_name' SHOW FIELDS FROM people LIKE '%\_name' # Show server status information. SHOW STATUS # Display server variables SHOW VARIABLES
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.