|
I am going to write a stored procedure to output N records of an arbitrary table
But it always doesn't work. In the stored procedure that needs to pass parameters, I have not succeeded yet.
create proc SkyCms
@TableName VARCHAR (200),
@RowNumber int
As
declare @TSql varchar (100)
Set @ Tsql = "Select Top" + @ RowNumber + "From" + @ TableName
Exec (@Tsql)
go |
|