Skip to content
Iampsp Blog

Iampsp Blog

I am a programming service provider

My Portfolio
Project order
Reviews
Favorite Exchange

Categories

  • C
  • C#
  • C++
  • CSS
  • Firefox Addons
  • Firefox Themes
  • HTML
  • JAVA
  • JavaScript
  • jQuery
  • Mybb Plugins
  • MySQL
  • PHP
  • Python
  • React
  • SQL

Recent Posts

  • jQuery – The noConflict() Method
  • jQuery – AJAX get() and post() Methods
  • jQuery – AJAX load() Method
  • jQuery – AJAX Introduction
  • jQuery Traversing – Filtering

MySQL DATABASE Function

Example

Return the name of the current (default) database:

SELECT DATABASE();

Definition and Usage

The DATABASE() function returns the name of the current database.

If there is no current database, this function returns NULL or “”.

Syntax

DATABASE()

Technical Details

Works in: From MySQL 4.0

 

Posted on 2025-03-13Author MostafaCategories SQLTags mysql command line, mysql count, mysql create user, mysql data type function, mysql database, mysql database administrator, mysql database backup, mysql database commands, mysql database connection, mysql database download, mysql database example, mysql database function, mysql database functions in php, mysql database hosting, mysql database interview questions, mysql database server, mysql database size, mysql date functions, mysql db function, mysql docker, mysql download, mysql insert into, mysql port, mysql row_number, mysql workbench, mysql_data_seek function in php, mysql_select_db function in php, why is mysql free

Post navigation

Previous Previous post: MySQL CURRENT_USER Function
Next Next post: MySQL IF Function
Proudly powered by WordPress