sql paging query (6 rows at a time)

-- whether the comparison data is the same 

select * from [dbo].[ProjecrInfo] where Project_state='audited' -- query how much data has been audited

-- Query by 6 rows at a time The first 6 is to display 6 rows of data at a time, you can change it to the number of rows you want to query at a time The second number is pagination
select top 6 * from ProjecrInfo where ProjectID not in
(select top 12 ProjectID from ProjecrInfo where Project_state = 'Approved' order by ProjectID ) and Project_state = 'Approved' order by ProjectID

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324970674&siteId=291194637