📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

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 │ └────────────┘

Was this page helpful?