DATABASE
Descriptionβ
Get the database of the current sql client connection.
Aliasβ
- SCHEMA
Syntaxβ
DATABASE()
or
SCHEMA()
Return Valueβ
The name of the database connected to the current sql client.
Examplesβ
select database(),schema();
+------------+------------+
| database() | database() |
+------------+------------+
| test | test |
+------------+------------+