May 19, 2021 at 10:08 am
Hello Everyone, Can anyone explain to me what are some common clauses used with SELECT query in SQL? Actually, I have checked the syntax of ORDER by clause and Having clause with the help of this SQL Source but I am looking for depth information regarding this. If anyone knows please explain me.
May 19, 2021 at 11:27 am
Good gosh, that's not a short list. You have DISTINCT and TOP in the SELECT list. ON in the JOIN criteria, plus APPLY, PIVOT and UNPIVOT. WHERE of course including GROUP BY, HAVING & ORDER BY. You could also argue for the inclusion of AS, sub-queries, correlated sub-queries and Common Table Expressions (CTE). That's a giant list to provide explanations for in a forum post.
Instead, I'll just point you to the top of the screen. There's a choice up there called "Stairways". Click on that. There are several series of articles on the fundamentals of T-SQL. That will have a very detailed answer what each of the common clauses are.
If you have a more specific question though, ask a way.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy