sql code to display first name and last name as full name code example
Example: Get first name and last name from full name string in SQL
DECLARE @FullName VARCHAR(50) = 'Mark Zuckerberg'
SELECT SUBSTRING(@FullName, 1, CHARINDEX(' ', @FullName) - 1) AS [First Name],
SUBSTRING(@FullName, CHARINDEX(' ', @FullName) + 1, LEN(@FullName)) AS [Last Name]