不知道为什么
用 exec('use northwind go ') 也不报错,但就是没有效果。
可以这样
sp_executesql N'select * from '+@db+'..products where productID > @ID',
              N'@ID int',
              @ID=10