Questions tagged «tablename»

10
表名作为变量
我正在尝试执行此查询: declare @tablename varchar(50) set @tablename = 'test' select * from @tablename 这将产生以下错误: 消息1087,第16级,状态1,第5行 必须声明表变量“ @tablename”。 动态填充表名的正确方法是什么?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.