如何在mssql中选择两列来添加相同的空格 [英] how to add identical space in between by selecting two column in mssql

查看:51
本文介绍了如何在mssql中选择两列来添加相同的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在选择两列:



I am SELECTING two columns:

SELECT ([FirstName] + [LastName]) AS [FullName], UserID WHERE CustomerID = @CustomerID





我只想知道是否有办法在两者之间添加相同的空格select语句中的两列。



I would just like to know if there is a way to add identical space in between the two columns in the select statement.

推荐答案

你的意思是在 FirstName 和<$ c之间添加空格$ c> LastName ?

Do you mean to add space between FirstName and LastName?
SELECT ([FirstName] + ' ' + [LastName]) AS [FullName], UserID WHERE CustomerID = @CustomerID

这篇关于如何在mssql中选择两列来添加相同的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆