What's the execute order of the different parts of a SQL select statement?

Posted by Yousui on Stack Overflow See other posts from Stack Overflow or by Yousui
Published on 2010-04-11T16:10:30Z Indexed on 2010/04/11 16:13 UTC
Read the original article Hit count: 256

Filed under:

Hi guys,

What's the execute order of the different parts of a SQL select statement? Such as
distinct
from
order by
group by
having
multiline function(count, avg, max, min...)
top(sql server) or limit(mysql)
other parts

Does the different databases have the same execution order? Great thanks.

© Stack Overflow or respective owner

Related posts about sql