create proc sp_proc_paixu
@orderby varchar(50)
as
begin
declare @str varchar(100)
set @str='select top 5 * from news_class order by ' + @orderby
exec (@str)
end
exec sp_proc_paixu 'class_id'
create proc sp_proc_paixu
@orderby varchar(50)
as
begin
declare @str varchar(100)
set @str='select top 5 * from news_class order by ' + @orderby
exec (@str)
end
exec sp_proc_paixu 'class_id'