SQL Server - Adding a string to a text column (concat equivalent)

后端 未结 6 1647
一整个雨季
一整个雨季 2021-02-03 20:21

How do you add a string to a column in SQL Server?

UPDATE [myTable] SET [myText]=\' \'+[myText]

That doesn\'t work:

The

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-03 20:52

    To Join two string in SQL Query use function CONCAT(Express1,Express2,...)

    Like....

    SELECT CODE, CONCAT(Rtrim(FName), " " , TRrim(LName)) as Title FROM MyTable
    

提交回复
热议问题