suppose I have a table which has a column days(‘mon’,’tue’,’wed’,’thu’,’fri’), how do I implement a days-of-week order (rather than lexicographical order) to them?
eg.
'mon'<'tue' //produce true
'fri'>'wed' //true
'fri'<'thu' //false
Thanks in advance!
Not the way you want:
Edit: you can also create a second table:
… and JOIN and SORT when SELECTing.
Last but not least, store days as numbers 🙂