日期:2014-05-17 浏览次数:20504 次
declare @tsql varchar(6000)
SELECT @tsql='select * from ['+RoutesTable+'] '
FROM Products_Info
WHERE ID = 20115009
exec(@tsql)
DECLARE @t NVARCHAR(10)
SELECT @t='SELECT RoutesTable
FROM Products_Info
WHERE ID = 20115009'
EXEC ('select * from '+@t)