uuid_order.sql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* postgres can not */
  2. select * from (
  3. select 1 as a,Uuid('00000000-0000-0000-0000-000000000000') as x
  4. union all
  5. select 2 as a,Uuid('01000000-0000-0000-0000-000000000000') as x
  6. union all
  7. select 3 as a,Uuid('00010000-0000-0000-0000-000000000000') as x
  8. union all
  9. select 4 as a,Uuid('00000100-0000-0000-0000-000000000000') as x
  10. union all
  11. select 5 as a,Uuid('00000001-0000-0000-0000-000000000000') as x
  12. union all
  13. select 6 as a,Uuid('00000000-0100-0000-0000-000000000000') as x
  14. union all
  15. select 7 as a,Uuid('00000000-0001-0000-0000-000000000000') as x
  16. union all
  17. select 8 as a,Uuid('00000000-0000-0100-0000-000000000000') as x
  18. union all
  19. select 9 as a,Uuid('00000000-0000-0001-0000-000000000000') as x
  20. union all
  21. select 10 as a,Uuid('00000000-0000-0000-0100-000000000000') as x
  22. union all
  23. select 11 as a,Uuid('00000000-0000-0000-0001-000000000000') as x
  24. union all
  25. select 12 as a,Uuid('00000000-0000-0000-0000-010000000000') as x
  26. union all
  27. select 13 as a,Uuid('00000000-0000-0000-0000-000100000000') as x
  28. union all
  29. select 14 as a,Uuid('00000000-0000-0000-0000-000001000000') as x
  30. union all
  31. select 15 as a,Uuid('00000000-0000-0000-0000-000000010000') as x
  32. union all
  33. select 16 as a,Uuid('00000000-0000-0000-0000-000000000100') as x
  34. union all
  35. select 17 as a,Uuid('00000000-0000-0000-0000-000000000001') as x
  36. ) as s order by x;