Here is a pre SQL Server 2016 method, which uses basic string functions to isolate the first and last names.
SELECT SUBSTRING(fullname, 1, CHARINDEX(' ', fullname) - 1) AS Firstname,
SUBSTRING(fullname,
CHARINDEX(' ', fullname) + 1,
LEN(fullname) - CHARINDEX(' ', fullname)) AS Lastname
FROM yourTable
Note that this solution assumes that the fullname
column only contains a single first name and a single last name (i.e. no middle names, initials, etc.).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…