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, 2721🔥, 0💬
Popular Posts:
What Happens to Your Transactions When ERROR 1205 Occurred in MySQL? If your transaction receives th...
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...
How to download and install the scaled-down database AdventureWorksLT in SQL Server? If you want to ...
How to download and install Microsoft .NET Framework Version 2.0 in SQL Server? .NET Framework Versi...
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs...