SIGN UP MEMBER LOGIN:    
Blog

What is SYSIBM.SYSDUMMY1 ?

Posted by Deepak Kumar Blogs | DB2 May 04, 2011
SYSIBM.SYSDUMMY1 is used to select the data which is not in a table. It is like DUAL Table in Oracle.

SYSIBM.SYSDUMMY1 is an EBCDIC table, provided by DB2. It is used when we need to fetch data that is not in a table, For e.g. Current Date, Current Time etc..

Example

>DB2 SELECT 2+3 FROM SYSIBM.SYSDUMMY1

1
-----------
5

1 record(s) selected.

>DB2 SELECT CURRENT DATE FROM SYSIBM.SYSDUMMY1

1
----------
05/04/2011

1 record(s) selected.


>DB2 SELECT CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1

1
--------------------------
2011-05-04-10.29.10.754000

1 record(s) selected.

share this blog :
post comment