eksempel
exec ('select * from openquery(' + @linkedServer +
', ''select c1,c2 from t1 where p1 = '' + @var1 + ''and p2= '' + @var2 + ''')
sørg for at læse The Curse and Blessings of Dynamic SQL for at beskytte mod SQL-injektion
eksempel
exec ('select * from openquery(' + @linkedServer +
', ''select c1,c2 from t1 where p1 = '' + @var1 + ''and p2= '' + @var2 + ''')
sørg for at læse The Curse and Blessings of Dynamic SQL for at beskytte mod SQL-injektion