Showing posts with label mysql concat() function. Show all posts
Showing posts with label mysql concat() function. Show all posts

Thursday, 19 July 2012

Mysql concat() function

mysql concat() function
This function combines two string into a single string.
uses:
1) SELECT CONCAT('FIRST_NAME', 'LAST_NAME') as concatname;
o/p: FIRST_NAME LAST_NAME
2) concat with separator
SELECT CONCAT_WS('-','FIRST_NAME','LAST_NAME');
o/p: FIRST_NAME-LAST_NAME