About 23,200,000 results
Open links in new tab
  1. mysql - How to determine which database is selected - Stack Overflow

    Oct 26, 2022 · Just use mysql_query (or mysqli_query, even better, or use PDO, best of all) with: SELECT DATABASE();

  2. How to Show the Current Database in MySQL | Delft Stack

    Mar 11, 2025 · This tutorial demonstrates how to show the current database in MySQL using various methods like SELECT DATABASE and SHOW DATABASES commands. Whether …

  3. 5.4 Getting Information About Databases and Tables - MySQL

    To find out which database is currently selected, use the DATABASE() function: If you have not yet selected any database, the result is NULL. To find out what tables the default database …

  4. DATABASE () – Get the Current Database Name in MySQL

    Dec 12, 2021 · In MySQL, DATABASE() is a built-in function that returns the default (current) database name. The result is returned as a string in the utf8 character set. If there is no default …

  5. MySQL DATABASE() Function - W3Schools

    The DATABASE() function returns the name of the current database. If there is no current database, this function returns NULL or "". Syntax

  6. MySQL | DATABASE() and CURRENT_USER() Functions

    Sep 3, 2024 · The DATABASE() and CURRENT_USER() functions in MySQL are essential for obtaining session-related information, such as the current database in use and the …

  7. MySQL SHOW DATABASES: List All Databases in MySQL - MySQL

    Use SHOW DATABASES statement to list all database in the current server. Querying database names from the schemata table in in the information_schema database.

  8. How to check Database in MySQL? - California Learning …

    Nov 9, 2024 · In this article, we’ll explore the different ways to check a database in MySQL, including the use of the SHOW DATABASES statement, SHOW TABLES statement, and the …

  9. In MySQL is there a variable for the current database?

    Apr 24, 2012 · use DATABASE() Returns the default (current) database name as a string in the utf8 character set. If there is no default database, DATABASE() returns NULL. Within a stored …

  10. How to show current database in mysql - devasking.com

    Aug 6, 2024 · When you work in the MySQL console and you want to see which database is used, type: CopySELECT database(); The result you see is the database you would activate with

  11. Some results have been removed
Refresh