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, 4232🔥, 0💬
Popular Posts:
How Run SQL*Plus Commands That Are Stored in a Local File in Oracle? If you have a group of commands...
How To Query Tables and Loop through the Returning Rows in MySQL? The best way to query tables and l...
Where to find answers to frequently asked questions in general areas of Microsoft SQL Server Transac...
Where to find MySQL database server tutorials? Here is a collection of tutorials, tips and FAQs for ...
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once y...