Skip to content

Instantly share code, notes, and snippets.

@tdittmar
Created December 10, 2016 18:28
Embed
What would you like to do?
Parameterize the T-SQL TOP clause
CREATE PROCEDURE dbo.sp_TestGetAll
@LIMIT INT
AS
SELECT TOP (@LIMIT) id, col1, col2, col3 FROM TestTable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment