DATABASE
The DATABASE function returns the current server.
The result of the function is a VARCHAR(18). The result cannot be null.
The CCSID of the string is the default SBCS CCSID at the current server.
Note
Syntax alternatives: The DATABASE function returns the same result as the CURRENT SERVER special register.
Examples
- Assume that the current server is 'RCHASGMA'.
Results in a value of ‘RCHASGMA'.SELECT DATABASE( ) FROM SYSIBM.SYSDUMMY1