How to do SELECT TOP @Param in a Stored Procedure?
Here I have created an integer param which is used later in the SELECT statement.
CREATE PROCEDURE [dbo].[SP_get]
@my_param int
AS
BEGIN
SET NOCOUNT ON;
SELECT TOP (@top_param) col1, col2, col3
FROM TableName
0 comments:
Post a Comment