by zasdffaa · 4y ago · 0 comments
That's frightening they don't know that. So, burn this into your minds: no ordering is guaranteed in SQL unless an ORDER BY is applied to it (and any ordering in a subquery is lost). Even if it seems to work, it will fail. No guarantees on order unless... scratch that onto your eyeballs so you never forget it.
Also, will people please stop posting rainbow-on-black screenshots, especially with the screenshotted text size smaller than the main text.
Or even better: have it as a connection/session parameter.
interesting! I like it.
> or appends a "random()" clause to an existing "order by" clause
That one I don't understand. If the Order By is there, why randomise it? I guess
order by p, q, r, random()
then it sort of allows you to find out if it's been ordered sufficiently for your needs - is that it?It's a common problem when moving from Mysql. We personally ran into that shortly after switching to Postgres, but seems like something they should've discovered a lot earlier for sure.