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, 2256🔥, 0💬
Popular Posts:
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, y...
Where to find answers to frequently asked questions on PHP Connections and Query Execution for MySQL...
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ......
What Happens If the Imported Table Already Exists in Oracle? If the import process tries to import a...