SQL result sets are unordered unless you have order by . SQL tables are unordered.
However, SQL Server provides at least one method for performing the necessary actions. If you use order by in a table with an identity column, and select has order by , then the identifier increases accordingly.
So, one way to do what you want is to have a column in [HöjdKortvågVänster] :
id int not null identity(1, 1) primary key insert into [test].[dbo].[HöjdKortvågVänster]([Höjd kortvåg vänster (null)]) select [Höjd kortvåg vänster (null)] from [test].[dbo].[test111] order by <appropriate column here>;
And then when you query the table, remember order by :
select * from [test].[dbo].[HöjdKortvågVänster] order by id;
source share