Name

dbname — get current catalog

Synopsis

dbname ( void);  
 

Description

Returns the current qualifier as set by the USE statement or default.

Parameters

None

Return Values

A varchar containing the current catalog name/qualifier.

Examples

Example 24.88. Simple Example

Get current catalog/qualifier

SQL> select dbname();
callret
VARCHAR
_______________________________________________________________________________

DB

1 Rows. -- 117 msec.
SQL> use Demo;

Done. -- 73 msec.
SQL> select dbname();
callret
VARCHAR
_______________________________________________________________________________

Demo

1 Rows. -- 4 msec.
SQL>