I have a column in my query for which I want to use its name alias .
Currently, it looks like this:
SELECT U.first_name + ' ' + U.last_name UserName,
But I want to use it as below
SELECT U.first_name + ' ' + U.last_name as User Name,
I tried but got an error:
Incorrect syntax next to the keyword "User".
source
share