最近看到很多mysql关于执行顺序,⚠️(不是手写顺序)
对:from->on->join->where->group by->having->select->distinc->union->order by->limit
错:from->on->join->where->group by->select->having->distinct->union->order by->limit
手写顺序:
select->distinct->from->join->on->where->group by->having->order by->unoin->limit