Is it possible to add to a parameter?

RPBLEA

Active member
Joined
Apr 26, 2005
Messages
36
Programming Experience
1-3
OKay I have this stored procedure which looks like this

CREATE procedure dbo.tenrows
@tenrows as int
as
SELECT *
FROM pairs
WHERE (orderkey < @tenrows)
GO


Now I want @tenrows to equal 10, But I was thinking I could do this somehow in .Net, For example a command button in aspx, Is it possible to add on the number 10 every time I click a button, Cause Right now it won't work because I have no value assigned to a parameter, ? ANy Help?
 
you may like to set the default value for @tenrows = 10 like that one
VB.NET:
CREATE procedure dbo.tenrows
@tenrows as int =10
as
SELECT     *
FROM         pairs
WHERE     (orderkey < @tenrows)
GO
 
Back
Top