我试图在线搜索,但似乎找不到有用的东西。
我有一个连接多个列的存储过程(见下文)。 是否可以将firstname和lastname合并为fullname?
SELECT Tickets.TicketID,
Tickets.Aangemaakt,
Prioriteit.Desc,
Status.StatusDesc,
User.Firstname,
User.Lastname,
Tickets.topic
FROM Tickets
LEFT JOIN Prioriteit
ON Prioriteit.PrioriteitID = Tickets.PrioriteitID
LEFT JOIN Personeel
ON User.UserId = Tickets.UserID
LEFT JOIN Status
ON Status.StatusID = Tickets.StatusID
WHERE Status.StatusID = @StatusID
类似的东西:
SELECT
User.Firstname + ' ' + User.Lastname AS Fullname