create proc test (@mobilecount bigint) as begin select top @mobilecount from tbl_mobiles
create proc test (@mobilecount bigint) as begin Declare @SQL varchar(max) SET @SQL = 'select top '+@mobilecount+' from tbl_mobiles' EXEC(@SQL)
alter proc test ( @mobilecount bigint ) as begin declare @n int set @n=@mobilecount select top (@n) mobile,ownerName from tbl_mobiles end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)