Click here to Skip to main content
15,886,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to return two columns as one in mysql.

Something in the lines of...
Table Movie.
Id
Title
TitleSub

select id, title+titlesub as combinedName from table



result
ID.....combinedName
1......Bob+Marley
2......Star Wars + Thumb Wars
3......Underworld + Vacation
4....
Posted

1 solution

Yes. You can concatenate column values in SQL.

SQL
SELECT 
  Id, (TITLE + TITLESUB) AS CombinedName
FROM 
  Movie

You can read about the same here.[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900