How to check the 1000th to 2000 records in TABLE?

xiaoxiao2021-03-06  38

Table1 (Col1 Int, Col2 Varchar (100)) 1: If there is no unique worth mentioning in Table1, you will add an Identity column to Table1. After the query is finished, DROP will drop the alter table table1 add newid Int IntTentity (1, 1) SELECT COL1, Col2 from table1 where newid> = 1000 and newid <= 2000alter Table Table1 Drop Column NewID2. If the value of the col1 in Table1 is unique, you can also select top 2000 * from table1 where col1 not in (SELECT TOP 1000 Col1 from table1)

转载请注明原文地址:https://www.9cbs.com/read-77904.html

New Post(0)