⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bugnet_applicationlog_getlog.sql

📁 BugNET is an issue tracking and project issue management solution built using the ASP.NET web applic
💻 SQL
字号:
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[BugNet_ApplicationLog_GetLog]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[BugNet_ApplicationLog_GetLog]
GO

CREATE PROCEDURE [dbo].[BugNet_ApplicationLog_GetLog] 
	@startRowIndex int ,
    @maximumRows int
AS

DECLARE @first_id int, @startRow int
	
-- A check can be added to make sure @startRowIndex isn't > count(1)
-- from employees before doing any actual work unless it is guaranteed
-- the caller won't do that

-- Get the first employeeID for our page of records
SET ROWCOUNT @startRowIndex
SELECT @first_id = Id FROM Log ORDER BY Id

-- Now, set the row count to MaximumRows and get
-- all records >= @first_id
SET ROWCOUNT @maximumRows


SELECT L.* FROM Log L
   
WHERE Id >= @first_id
ORDER BY L.Id

SET ROWCOUNT 0




GO

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -