Preserving ORDER BY in SELECT INTO

前端 未结 8 773
南笙
南笙 2020-11-27 07:18

I have a T-SQL query that takes data from one table and copies it into a new table but only rows meeting a certain condition:

SELECT VibeFGEvents.* 
INTO Vib         


        
8条回答
  •  鱼传尺愫
    2020-11-27 08:15

    You cannot do this with ORDER BY but if you create a Clustered Index on VibeFGEvents.id after your SELECT INTO the table will be sorted on disk by VibeFGEvents.id.

提交回复
热议问题