Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.