website logo
⌘K
🏠Homepage
👋Introduction
Key Concepts & Architecture
🚀Getting Started
👨‍💻SQL Reference
SQL Queries
SQL Clauses
SQL Data Types
SQL Functions
Schema
🚨Error Handling
🆚Differences Between Oxla vs. PostgreSQL
Docs powered by archbee 

CURRENT_DATABASE

4min

You will learn how to use the CURRENT_DATABASE() function to get the database’s name.

Overview

The CURRENT_DATABASE() returns the current database's name.

Syntax

The following syntax describes CURRENT_DATABASE() function.

Syntax
|
SELECT CURRENT_DATABASE();


It does not require any argument to operate.

Example

In the following example, we will obtain the database name to which we are currently connected. 

Current database
|
SELECT CURRENT_DATABASE();


The function will return the result with the database name:

Output
|
+------------+
| f          |
+------------+
| Oxla       |
+------------+




Updated 11 May 2023
Did this page help you?
Yes
No
PREVIOUS
CURRENT_SCHEMA
NEXT
Schema
Docs powered by archbee 
TABLE OF CONTENTS
Overview
Syntax
Example

Dedicated to data analytics that provides 10x faster execution of analytical queries than current state of the art solutions. We are launching SOON! Join the waiting list for more info.




©2022 Oxla