Results 1 to 2 of 2

Thread: Query1

  1. #1
    Join Date
    May 2008

    Question Unanswered: Query1

    Dear All,

    As select NULL as AA from TableName works in Oracle. What should be done to run this in DB2

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    DB2 needs to know what data type the NULL is supposed to be. Change it to:

    select cast(NULL as int) as AA from TableName

    I just used int for convenience, it can be whatever data type you want.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts