SQL Server : rows in table changed their order

后端 未结 1 1993
故里飘歌
故里飘歌 2021-01-27 05:31

I\'ve created table with number like this: How to find gaps of data and insert NULL data points instead having gap

;WITH
Pass0 as (select 1 as C union all select         


        
1条回答
  •  抹茶落季
    2021-01-27 05:46

    Rows in a table can not change their order because..... they do not have an order. The order of a set is not defined. Unless your select has an ORDER BY clause the order it is returned is random and can change even between two calls.

    That is fundamental SQL.

    You want an order, put an order into the SELECT statement.

    0 讨论(0)
提交回复
热议问题