DB2: How to get Timestamp from Sysdummy1

SYSIBM.SYSDUMMY1 is EBCDIC table, provided by DB2. The purpose is to get Current Date, Current Time etc. form this Table.

Example

DB2 SELECT 2+3 FROM SYSIBM.SYSDUMMY1

Output:

1
----
5

1 record(s) selected.

DB2 SELECT CURRENT DATE FROM SYSIBM.SYSDUMMY1

Output:

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

1 record(s) selected.

DB2 SELECT CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1

Output:

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

1 record(s) selected.

Audio Post

Listen using mobile on Sysdummy1

Keep Reading

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.