Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For more complicated examples, HAVING can produce easier to read/understand/maintain statements.

There may also be performance differences depending on the rest of the query, but for simple examples like this exactly the same plan will be used, so the performance will be identical.

Unfortunately, the simplest examples do not always illustrate the potential benefits of less common syntax.



I totally agree with that, but I was responding to this statement:

> Subselects can't do something like: (…)

which is wrong.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: