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

前端 未结 3 1596
借酒劲吻你
借酒劲吻你 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:38

    CONCATdoesn't exist in SQL Server 2008, it is new since SQL Server 2012.

    You could use instead:

    select id1, id2, id1 +  ", " + id2 as combo1
    FROM db1
    group by combo1
    

提交回复
热议问题