|
|
|
|
|
by biztos
1301 days ago
|
|
I’m not the parent but for me: 1. Sort by ID if you want to see things by insert order and are using serial/autoincrement for the PK. 2. Writing (or reading, or talking about) SQL queries in which the IDs are present. I solved the first problem by using ULID at one point but in future I’d probably not use a UUID until I had a specific need for it. And as others have mentioned, if that need is about the outside world I’d probably go with an extra column. |
|
Most RDBMSes (possibly all of the big ones?) do this by default if you opt for no ORDER BY clause, however that IS then depending on undefined behavior which is bad.