In MySQL, is there a difference between those 2 queries?
SELECT * FROM .... ORDER BY Created,Id DESC
and
SELECT * FROM .... ORDER BY Created DESC, Id DESC
Desired behaviour: order (descending ) by “Created” ( a timestamp) but when two items have the same “Created” value then fall back to ordering ( desc ) using the Id.
Yes, there is a difference. The default order is ascending, so:
Will order by
Createdascending, and thenIddescendingWill order by
Createddescending, and thenIddescending