Skip to main content
VeloDB Cloud 26.x·Apache Doris 4.x (up to 4.0 supported)·"Since X.Y" tags refer to Apache Doris versionsVersion mapping

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 |
+------------+------------+