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, 2426🔥, 0💬
Popular Posts:
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
Where to find answers to frequently asked questions on Transaction Management: Commit or Rollback in...
Can You Drop an Index Associated with a Unique or Primary Key Constraint in Oracle? You can not dele...
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL...
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can u...