📜  sql server rtrim 字符后的所有内容 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:14.509000             🧑  作者: Mango

代码示例1
SELECT   [FullName]
        ,LEFT([FullName], CHARINDEX(',', [FullName]) - 1) AS [Surname]
        ,REPLACE(SUBSTRING([FullName], CHARINDEX(',', [FullName]), LEN([FullName])), ',', '') AS [FirstName]
FROM    Employee