This syntax is used to query all current databases.
1 | SHOW [DATABASES | SCHEMAS] [LIKE regex_expression]; |
None
Parameter |
Description |
---|---|
regex_expression |
Database name |
Keyword DATABASES is equivalent to SCHEMAS. You can use either of them in this statement.
View all the current databases.
1 | SHOW DATABASES; |
View all databases whose names start with test.
1 | SHOW DATABASES LIKE "test.*"; |