Топ-100
 
CerebroSQL

DATABASE

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

Syntax:
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 routine, the default database is the database
that the routine is associated with, which is not necessarily the same
as the database that is the default in the calling context.

URL: https://dev.mysql.com/doc/refman/8.0/en/information-functions.html

Example

mysql> SELECT DATABASE();
-> 'test'