This shows you the differences between two versions of the page.
— |
concat [2015/09/23 20:26] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== CONCAT Function - PL/HQL Reference====== | ||
+ | CONCAT function concatenates two or more strings. | ||
+ | |||
+ | **Syntax**: | ||
+ | |||
+ | <code language="sql"> | ||
+ | CONCAT(expr, expr2 [, expr3, ...]); | ||
+ | </code> | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | * If an expression evaluates to NULL it is treated as an empty string | ||
+ | * CONCAT returns NULL only if all expressions evaluate to NULL | ||
+ | |||
+ | **Return Type:** | ||
+ | |||
+ | STRING | ||
+ | |||
+ | **Example:** | ||
+ | |||
+ | <code language="sql"> | ||
+ | CONCAT('a', 'b', NULL, 'c'); | ||
+ | </code> | ||
+ | |||
+ | Result: abc | ||
+ | |||
+ | **Compatibility**: Oracle, IBM DB2, Teradata, Microsoft SQL Server, PostgreSQL, MySQL and Netezza | ||
+ | |||
+ | **Version**: PL/HQL 0.3.1 | ||
+ | |||
+ | See also: | ||
+ | * [[twopipes||| Operator]] |