On Monday, February 8, 2016, Venkatesan, Sekhar <
sekhar.venkatesan@emc.com> wrote:
My concern here is that I want to maintain consistency ( in our application to retain sort order) between different databases.
I don't see the issue in SQL Server and Oracle databases.
"SELECT KH_.r_object_id, KH_.object_name FROM dbo.dm_location_s AS ZS_ INNER JOIN
dbo.dm_sysobject_s AS KH_ ON ZS_.r_object_id = KH_.r_object_id "
The above query is sorted based on the first column in the select list. Same is not happening in PostgreSQL.
Is this something to do with collation setting in database?
ORDER BY is SQL standard. Add it and call it a day. You are relying on undocumented implementation details otherwise.
David J.