LMSouq
general-dev Open

WHERE vs HAVING

BA
baloo
1 month ago
3 views
Problem Description
Why do you need to place columns you create yourself (for example `select 1 as "number"`) after `HAVING` and not `WHERE` in MySQL? And are there any downsides instead of doing `WHERE 1` (writing the whole definition instead of a column name)?

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base