about how the database queries the second data with different IDs
In the Sever 2008 database, the query statement is
SELECT * FROM table name or select column name from table name
This is to query all the data in a table, then query the second statement?
Start with "Top 2" can query the first two data, and then sorted according to the specified column name, so that you can
"SELECT top 2 * from table name order BY column name desc" (DESC reverse ACS positive sequence),
But the query out for the last two data, visible is the first reverse and then query the first two. Then the reverse is not feasible.
There are two data in the positive order, so that if one is removed, it is obvious that the first piece is taken out. First we have to find out,
"SELECT top 1 * FROM table name order BY column name ID" (positive order does not need to add ACS, itself is the positive order)
Then the ID of the data is removed, how to remove the "not in"
"SELECT * from table name where column name ID not in (SELECT Top 1 column name ID from table name Order by column name ID)"
So the data of the query does not exist the first data, now the second article becomes the first data. and "How the database queries the second data and the ID is different" is now the first data query.
"SELECT top 1 * from table name where column name ID not in (SELECT top 1 column name ID from table name Order by column name ID)"
How the database queries the second data with different IDs