5
Suppose I make one SELECT
sort of like this:
SELECT * FROM "users" ORDER BY "createdAt";
In this context, if I have data that has the same value in the field createdAt
, how SQL will sort these fields?
P.S.: I know that if there is another field in the clause ORDER BY
"solve" this problem.
P.P.S.: I want to know how SQL reacts to this kind of situation. Will it always show the same order? Or is it kind of random, if there is such a "collision" in the values of the ordering clause?
if it is not possible to group, select would return as it normally would without the group, depending on the database, if the table has Dice, etc.. but in general, it is equal to the result of the select without group
– Ricardo Pontual
What will happen roughly is that the item (i) will not be larger than the (i+1) so i++
– Motta