I am trying to add two columns as one column by using this statement
SELECT (member_Firstname+''+member_Lastname) AS Name FROM members
but it gives all 0 values in mysql workbench
SELECT concat(member_Firstname,'',member_Lastname) AS Name FROM members;
This should work always
I think that in MySQL you should use CONCAT, as follows:
mysql> SELECT CONCAT('My', 'S', 'QL'); -> 'MySQL'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With