expression || expression String concatenation (two vertical bars). If either string is NULL, it is treated as the empty string for concatenation.
expression + expression Alternative string concatenation. When using the + concatenation operator, you must ensure the operands are explicitly set to character data types rather than relying on implicit data conversion.
For example, the following query returns the integer value 579:
SELECT 123 + 456; |
whereas the following query returns the character string 123456:
SELECT '123' + '456'; |
You can use the CAST or CONVERT function to explicitly convert data types.
SQL/2003 The || operator is the SQL/2003 string concatenation operator.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |