+ 1
What happens with two filters in SQL
What happens in SQL when aggregation functions like AVG() , WHERE, GROUP BY, HAVING, LIKE are used simultaneously in a statement. If valid, what is the order followed.
3 Respostas
+ 5
SQL execute as the order below.
FROM/JOIN
WHERE
GROUP BY
HAVING
SELECT
ORDER BY
LIMIT/OFFSET
AVG() is belong to the SELECT clause.
It is totally valid to put those keywords in a single SQL statement.
+ 1
Shashank Reddy Voorelli
In which clause your write %LIKE%?
Answer: WHERE clause. So %LIKE% belongs to WHERE clause. The SQL will do what you ask for given you write it correctly.
[EDIT]
%LIKE% also works with HAVING too!
0
Wong Hei Ming could you please tell me what happens with 'LIKE' also.
Thank you.