2

What does || mean in this db2 syntax?

enter image description here

1
  • 4
    The || is the concatenation operator in SQL
    – user1822
    Commented Oct 24, 2016 at 5:50

1 Answer 1

3

The || is shorthand for CONCAT.

2
  • 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. Commented Oct 24, 2016 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
    Commented Oct 25, 2016 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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