Collections:
DATABASE() - Name of Current Database
How to obtain the name of the current database using the DATABASE() function?
✍: FYIcenter.com
DATABASE() is a MySQL built-in function that
returns the name of the current database.
For example:
USE mysql; Database changed SELECT DATABASE(); -- +------------+ -- | DATABASE() | -- +------------+ -- | mysql | -- +------------+
Reference information of the DATABASE() function:
DATABASE(): name Returns the name of the current database. Arguments, return value and availability: name: Return value. The name of the current database. Available since MySQL 4.0.
⇒ FOUND_ROWS() - Row Count from Last SELECT Statement
⇐ CURRENT_USER() - Authentication Name of Current User
2025-06-18, 2676🔥, 0💬
Popular Posts:
What Happens If the Imported Table Already Exists in Oracle? If the import process tries to import a...
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to chara...
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want t...
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Serve...
How To Convert Character Strings into Numeric Values in SQL Server Transact-SQL? Sometimes you need ...