F
F
fintbochechki2015-10-27 10:31:33
SQL
fintbochechki, 2015-10-27 10:31:33

Why is the row order in a table not preserved when exporting data to SQL Server 2014 Management Studio?

Good afternoon, ladies and gentlemen!
At the moment, I use the free version of SQL Server 2014 for data storage. There are two standard Database Engine servers on the computer. There are no rights restrictions. There are several databases on these two Database Engines.
The problem arose when using the standard function of exporting data from one DB to another (Tasks -> Export Data). When you export data, the order of the rows in the table changes. At the same time, I did not identify a clear pattern or connection with any processes or applications running on the computer.
The tables are relatively large - the number of rows is measured in millions.
Has anyone encountered similar problems?
If this has been asked before, I apologize in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri, 2015-10-27
@fintbochechki

Good afternoon!
Here it is most likely necessary to specify sorting, if you do not specify sorting, SQL Server will not necessarily take rows in order.

A
Andrey Skorzhinsky, 2015-10-29
@AndyKorg

If the term "row" is interpreted as "a row of a DB", then it is necessary to take into account that relational DBs store rows in the order in which they please (with some assumption). Therefore, the responsibility for the sort order of rows when outputting data to the outside world lies entirely with the user.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question