"Venkatesan, Sekhar" <sekhar(dot)venkatesan(at)emc(dot)com> writes:
> I am seeing this behavior change in postgreSQL DB when compared to SQL Server DB when JOIN is performed. The sort order is not retained when JOIN is performed in PostgreSQL DB.
What sort order? You did not specify any ORDER BY clause, so the DBMS is
entitled to return rows in any order it feels like.
I do not know anything about this "top 10" modifier you've got in the
SQL Server version, but I suspect it's implying a sort order. In
Postgres, if you want a specific row ordering, you need to say ORDER BY.
regards, tom lane