Reputation: 6608
Select user_name [User Name], first_name [First Name], last_name [Last Name]
From tab_user
ORDER BY user_name
Select user_name [User Name], first_name [First Name], last_name [Last Name]
From tab_user
ORDER BY User Name
Above are the two queries,
Upvotes: 0
Views: 70
Reputation: 838106
Your second query won't work. It needs to be this:
ORDER BY [User Name]
Once this is fixed there is no difference in the results. The syntax SELECT User_Name [User Name]
creates an alias.
Upvotes: 1
Reputation: 12934
Yes, it has to be user_name and not user uame. Space is not allowed.
Upvotes: 0
Reputation: 10753
the second query shouldn't work should it? you would need to
order by [User Name]
Upvotes: 1