Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concat or +

Status
Not open for further replies.

sebes

Programmer
Apr 5, 2011
45
RO
hello,

Can I use something like this in MySQL ?

Select string1 + string2 as field name ?

OR do I have to use

select concat(string1, string2) as fieldname ?

Thanks.
 
Hi

Only [tt]concat()[/tt] or [tt]concat_ws()[/tt] ( or maybe [tt]group_concat()[/tt] ).

Using [tt]+[/tt] for string concatenation is MSSQL's proprietary syntax.

The standard concatenation operator is [tt]||[/tt], but in MySQL that one is used as synonym for logical [tt]or[/tt].

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top