Skip to main content
VeloDB Cloud 26.x·Apache Doris 4.x (≤ 4.0 supported)·"Since X.Y" tags refer to 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 |
+------------+------------+