Skip to content

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

func.database()
func.database()
┌─────────────────┐
│ func.database() │
├─────────────────┤
│ default │
└─────────────────┘
DATABASE()
SELECT DATABASE();
┌────────────┐
database() │
├────────────┤
default
└────────────┘