一个存储过程的问题的问题?
xgcom 2006-02-14 03:27:36 CREATE PROCEDURE PRO1(
@table1 nvarchar(40) output,
@table2 nvarchar(40) output ) AS
select @table1=table1 from table0 where id=1
--我希望得到 select @table2=table2 from @table1 where id=1 的 @table2
总是有问题,不知道什么写如:
exec('select '+@table2+'=table2 from '+@table1+' where id=1') --也不行