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
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
No comments:
Post a Comment