cplsplsprogrammer
Programmer
Hello all,
I am trying to write a stored procedure which takes in a number as input and retrieves the top number of results. I wrote the following code but it is not working. Can anyone please tell me what I am doing wrong or what is the correct procedure to write the statement.
Create Procedure records (@count int not null)
as
begin
select top @count id, type, evtime from customerTable
end
GO
Thanks.
I am trying to write a stored procedure which takes in a number as input and retrieves the top number of results. I wrote the following code but it is not working. Can anyone please tell me what I am doing wrong or what is the correct procedure to write the statement.
Create Procedure records (@count int not null)
as
begin
select top @count id, type, evtime from customerTable
end
GO
Thanks.