DATABASE/SCHEMA

Description

The DATABASE and SCHEMA functions are used interchangeably. They return the name of currently-connected database as a VARCHAR type.

Syntax

DATABASE()

SCHEMA()

Example

SELECT DATABASE(), SCHEMA();

   database()            schema()

============================================

  'demodb'              'demodb'