Skip to content

Instantly share code, notes, and snippets.

@gbdavid2
Last active February 19, 2017 20:28
Show Gist options
  • Save gbdavid2/01c92bd8c3b7708aadc8 to your computer and use it in GitHub Desktop.
Save gbdavid2/01c92bd8c3b7708aadc8 to your computer and use it in GitHub Desktop.
Basic use of a parameter with TOP (Transact-SQL)
DECLARE @top AS INT = 100
SELECT TOP (@top) * FROM Sales.SalesOrderHeader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment