Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL SELECT + add a character after value

Tags:

sql

mysql

I need to add a character after a value. For example:

SELECT brand FROM `autoinfo` WHERE 1

result:

Audi  
Ford  
...

I need to that result:

Audi w  
Ford w  
...  

How can I do this?

like image 930
user2516034 Avatar asked Jan 20 '26 18:01

user2516034


1 Answers

If you need to concatenate a symbol after the brand, then use the CONCAT() function:

SELECT concat(brand, ' w') as brand
FROM `autoinfo` 
WHERE 1;
like image 80
Taryn Avatar answered Jan 23 '26 06:01

Taryn