Is there a way to make my own order on demand in sqlite?
For example, I have essentially an enumeration
_id | Name | Key
------------
1 | One | Named
2 | Two | Contributing
3 | Three | Named
4 | Four | Key
5 | Five | Key
6 | Six | Contributing
7 | Seven | Named
And the key columns are in order. Say Key> Named> Contributing.
Is there any way to do
SELECT * FROM table ORDER BY Key
bring something back into action
_id | Name | Key
------------
4 | Four | Key
5 | Five | Key
1 | One | Named
3 | Three | Named
7 | Seven | Named
2 | Two | Contributing
6 | Six | Contributing
source
share