热爱编程事业
方法一:create proc pub1
@table nvarchar(200),
@id int
as
exec('select * from ['+ @table+'] where id='+@id)
exec pub1 'admin','2'
方法二:
alter proc up_test @table varchar(500)
declare @str varchar(500)
set @str = 'Select * from ' + @table
Copyright @ 2024 风景 Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster