Results 1 to 2 of 2

Thread: Query1

  1. #1
    Join Date
    May 2008
    Posts
    1

    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
    Posts
    4,292
    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.

    Andy

Posting Permissions

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