CONCAT_WS() फ़ंक्शन
CONCAT_WS(separator, col1, col2, ...) सेपरेटर के साथ कॉलम जोड़ता है।
उदाहरण
mysql> create table demo38 (
-> user_id int,
-> user_first_name varchar(20),
-> user_last_name varchar(20),
-> user_date_of_birth date
-> );
mysql> insert into demo38 values(10,'John','Smith','1990-10-01'), (11,'David','Miller','1994-01-21'), (11,'John','Doe','1992-02-01'), (12,'Adam','Smith','1996-11-11'), (13,'Chris','Brown','1997-03-10');
क्वेरी: user_id 11 और 13 के लिए फ़ॉर्मेटेड आउटपुट
mysql> select concat_ws('/', user_first_name, user_last_name, 'the date of birth year is=', date_format(user_date_of_birth,'%Y')) as Output from demo38 where user_id in(11,13);
+----------------------------------------------+ | Output | +----------------------------------------------+ | David/Miller/the date of birth year is=/1994 | | John/Doe/the date of birth year is=/1992 | | Chris/Brown/the date of birth year is=/1997 | +----------------------------------------------+