katerberg / 9th-seed

Twitch Bot and API for Vintage Rotisserie Draft
GNU Affero General Public License v3.0
1 stars 0 forks source link

Order responses in SQL Selects #35

Closed katerberg closed 4 years ago

katerberg commented 4 years ago

you oughtta have an order by clause in that sql change you made for portent if you're relying on getting the alphabetically-first matching result. order of sql results is undefined without an order by clause. many databases give you ordering based on the pk 99% of the time and then arbitrarily change the order based on weird runtime database engine decisions

unless your database goes beyond the sql standard and guarantees this, and you're not interested in writing standard sql that could be moved to a different db