0

How do I return the system date or datetime in DB2 for Z/OS using SQL? I am more familiar with SQL Server, where I would use "SELECT getdate()". I've tried a few permutations of this on DB2, but with no luck so far. Seems like I need a predicate, but am not sure where system information would be "FROM". Can anyone enlighten me?

FremenFreedom
  • 519
  • 2
  • 12

2 Answers2

1

Try select current date from sysibm.sysdummy1

MacBrave
  • 58
  • 5
1

Alternately, try:

values(current timestamp) 
LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114