Skip to main content

DATABASE

Returns the name of the currently selected database. If no database is selected, then this function returns default.

Syntax

DATABASE()

Examples

SELECT DATABASE();

┌────────────┐
database()
├────────────┤
default
└────────────┘
Did this page help you?
Yes
No
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today