cm0002@infosec.pub to Programmer Humor@programming.dev · 1 year agoClock, but its ORDER BY Hour DESCinfosec.pubimagemessage-square22fedilinkarrow-up1342arrow-down113
arrow-up1329arrow-down1imageClock, but its ORDER BY Hour DESCinfosec.pubcm0002@infosec.pub to Programmer Humor@programming.dev · 1 year agomessage-square22fedilink
minus-squarezr0@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up14arrow-down1·1 year agoOrder by string desc would be Z-A ordering, or 9-0 ORDER BY str(Hour) DESC: 9, 8, 7, 6, 5, 4, 3, 2, 12, 11, 10, 1 ORDER BY int(Hour) DESC: 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
Order by string desc would be Z-A ordering, or 9-0
ORDER BY str(Hour) DESC: 9, 8, 7, 6, 5, 4, 3, 2, 12, 11, 10, 1ORDER BY int(Hour) DESC: 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1