Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



CONCAT Function

Description

The CONCAT function has at least one argument specified for it and returns a string as a result of concatenating all argument values. The number of parameters that can be specified is unlimited. Automatic type casting takes place if a non-string type is specified as the argument. If any of the arguments is specified as NULL, NULL is returned.

If you want to insert separators between strings specified as arguments for concatenation, use the CONCAT_WS Function.

Syntax

CONCAT( string1, string2 [,string3 [, ... [, stringN]...]])

 

string :

character string

NULL

Example

SELECT CONCAT('CUBRID', '2008' , 'R3.0');

   concat('CUBRID', '2008', 'R3.0')

======================

'CUBRID2008R3.0'

 

--it returns null when null is specified for one of parameters

SELECT CONCAT('CUBRID', '2008' , 'R3.0', NULL);

   concat('CUBRID', '2008', 'R3.0', null)

======================

    NULL

 

 

--it converts number types and then returns concatenated strings

SELECT CONCAT(2008, 3.0);

   concat(2008, 3.0)

======================

    '20083.0'