Re:User-defined Order in SQL
by wainstead on Wednesday March 21, 2018 @10:07AM
(#16638071)
I think one of the first design choices you have to make is: can preceded_by be NULL? The first item in the list has to do something with preceded_by. As a general rule making columns NOT NULL is prefereable; here I declared it NOT NULL, and the first row must reference itself as a result:
I didn't do any operation to fix the sorting order once I updated item #4, so there's more work to do here. I don't think it's a practical solution.
[ Parent
| on HN ]
There are no comments on this comment yet.