MySQL & Oracle 的SQL执行顺序

MySQL 执行顺序

     from
     on
     join
     where
     group by
     having
     select
     distinct
     order by
     limit
    
     注:where条件的执行顺序,是从左到右

    
Oracle 执行顺序    
    from
    on
    join
    where
    group by
    with
    having
    select
    distinct
    order
    top
    
    注:where条件的执行顺序,是从右到左

猜你喜欢

转载自blog.csdn.net/qq_18484879/article/details/80323341