cancel
Showing results for 
Search instead for 
Did you mean: 

Does Sybase / SAP ASE have the same issue like HANA with SELECTs without explicit ORDER BY

mkretz
Explorer
0 Kudos

SAP HANA has the effect that ABAP SELECT without ORDER BY specified can return unexpected results (Code Inspector variant FUNCTIONAL_DB).

Does Sybase ASE have the same issue or how does it behave?

Accepted Solutions (1)

Accepted Solutions (1)

eralper_yilmaz
Participant
0 Kudos

Hello Michael,

Any query on any database does not guarantee that resultset will be returned according to a rule unless ORDER BY is used explicitly

For disk based databases, data is written in "data pages" which are linked somehow one another. If ORDER BY is not used in the query, SQL Engine will not spend CPU or processing power or time for sorting the data. It will return data from data pages, it could fetch in the fastest time. And because of fragmentation, etc data can be distributed or written to data pages randomly.

SQL Server, Oracle and as you noted Sybase does not guarentee the sorting without ORDER BY

Answers (0)