-
Data in different Order
Hi,
I have Three environments, Test, Development and Production.
We are using the same production backup to refresh the Test, Dev database.
And trying to select from one table without order by clause,
Select * from table_a;
Test and Production are giving data with same order, but in Development its in different order. Only Primary key is there and no other index are there with this table. Everything looks similar for this table in all the environments.
Is there any specific reason that retrives data in different order.
Thanks
-
you can only guarantee order by using the order by clause
data isnt stored in order so the database will return it in any way it sees fit
-
Thanks..
Primary key will not make any difference? I believe that the primary key will re-arrange the data in physical storage based on the key values. Is that wrong?
-
no, its just a primary key, has nothing to do with storage
heap tables have no order, its why they are called heaps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|