Dynamic SELECT TOP @var In SQL Server September 25, 2022 by Tarik SELECT TOP (@count) * FROM SomeTable This will only work with SQL 2005+