Concerned with Top in sql
- by ramyatk06
hi guys,
I have variable @count of datatype int.I am setting values to this @count.
I want to select top @count number of rows from table.When i use Select top @count,its showing error.
Delete from ItemDetails where GroupId in (Select Top @count Id from ItemDetails where GroupId=@Prm_GroupId )
The error is Incorrect syntax near '@count'.Can anybody help?