Sunday, 4 November 2018

DB2 - How to find Host Name of server



Below worked for me.
SELECT * FROM TABLE(SYSPROC.ENV_GET_SYS_INFO());

DB2 - How to determine the DB2 LUW Product, Version and Fix Pack level of an Instance




Both worked for me.
SELECT * FROM TABLE(SYSPROC.ENV_GET_INST_INFO());
or
SELECT * FROM SYSIBMADM.ENV_INST_INFO;


Oracle - How to check Database Version


This will give you the detailed version number of the database components.

SELECT * FROM V$VERSION;

or You could run

Select * from PRODUCT_COMPONENT_VERSION;


Referenced from

https://docs.oracle.com/cd/B28359_01/server.111/b28310/dba004.htm#ADMIN11032

Thursday, 1 November 2018

DB2 - Isnull function

Use COALESCE 

The COALESCE function returns the value of the first nonnull expression.

eg


select COALESCE( null,'noNullIsselected') as Col from sysibm.sysdummy1