Thursday, 6 February 2020

mysql concat two columan

SELECT CONCAT(c.FIRSTNAME, ',', c.LASTNAME) AS FIRSTNAME,
       c.*
FROM   `customer` c;
search on two concat columan

WHERE CONCAT(customers.first_name, ' ', customers.last_name) LIKE '%John Smith%'

WHERE CONCAT(TRIM(customers.first_name), ' ', TRIM(customers.last_name)) LIKE '%John Smith%'

No comments:

Post a Comment