2

What does || mean in this db2 syntax?

enter image description here

3

The || is shorthand for CONCAT.

  • 1
    It's probably the other way around. CONCAT() is a function that does the same thing as the concatenation operator || and can accept multiple parameters. CONCAT is not even a reserved word in standard SQL. – ypercubeᵀᴹ Oct 24 '16 at 10:50
  • Amusingly enough, it really is that || is short-hand for CONCAT in DB2 but then DB2 (and Oracle) both pre-date the SQL standard so I could believe they picked something excessively verbose for concatenation at first (especially given SQL's general tendency toward verbal excess) – Dave Jones Oct 25 '16 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.