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, 4570🔥, 0💬
Popular Posts:
What Are Bitwise Operations in SQL Server Transact-SQL? Bitwise operations are binary operations per...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
Where to find answers to frequently asked questions I am new to Oracle database. Here is a list of f...
What Happens If the UPDATE Subquery Returns Multiple Rows in SQL Server? If a subquery is used in a ...