April 2008
Intermediate to advanced
566 pages
21h 55m
English
SCHEMA()
SCHEMA()
This function returns the name of the database currently in use for the session. There are no arguments. If no database has been set as the default, it returns NULL. Here is an example:
SELECT SCHEMA( ); +--------------------+ | DATABASE( ) | +--------------------+ | company_database | +--------------------+
Introduced in version 5.0.2 of MySQL,
SCHEMA() is a synonym for DATABASE().
Read now
Unlock full access