Mayfield Global Knowledge Center



How do I concatenate two columns in Microsoft SQL Server 2005?

Use + to concatenate two columns. For example:

SELECT DeviceMgf.MfgName + ' ' + DeviceModel.ModelName AS Device, DeviceModel.ModelID
FROM DeviceMfg INNER JOIN DeviceModel ON DeviceMfg.MfgID = DeviceModel.MfgID
ORDER BY Device

Adding + ' ' + will concatenate the two columns and put a space in between them.

Would you like to...


del.icio.us

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favoritesAdd to favorites

User Opinions (4 votes)

75% thumbs up 25% thumbs down

How would you rate this answer?

Helpful
Not helpful
Thank you for rating this answer.