Concat two column in a select statement sql server 2005

前端 未结 3 1220
野趣味
野趣味 2021-01-13 08:59

How to Concat two column in a select statement sql server 2005?

Here is my statement Select FirstName,secondName from Table...

Now i did try con

3条回答
  •  Happy的楠姐
    2021-01-13 09:14

    If one of your fields is numeric then you can cast it to a string as follows:

    SELECT FirstName + ISNULL(' ' + SecondName, '') + ' age(' + CONVERT(nvarchar,age) + ')' from Table
    

提交回复
热议问题