Insert into a row at specific position into SQL server table with PK

前端 未结 6 1067
抹茶落季
抹茶落季 2020-12-16 23:58

I want to insert a row into a SQL server table at a specific position. For example my table has 100 rows and I want to insert a new row at position 9. But the ID column whic

6条回答
  •  囚心锁ツ
    2020-12-17 00:19

    No, you can't control where the new row is inserted. Actually, you don't need to: use the ORDER BY clause on your SELECT statements to order the results the way you need.

提交回复
热议问题