SQL Server 2008 Express CONCAT() doesn't exist?

前端 未结 3 1599
借酒劲吻你
借酒劲吻你 2020-12-10 02:03

I\'m making switch from MySQL to SQL Server 2008 Express and can\'t seem to find a CONCAT()-esque function. I have two columns I\'m trying to combine into a string and find

3条回答
  •  佛祖请我去吃肉
    2020-12-10 02:35

    You can use CONCAT in SQL 2008 (if you REALLY want) by wrapping in brackets

    {fn CONCAT(id1,id2)} AS combo1
    

    NOTE: CONCAT only takes two arguments, so you must nest them if you wish to concatenate more than two strings:

    {fn CONCAT(id1,{fn CONCAT(id2,id3)})} AS combo2
    

提交回复
热议问题