SQL exec 报错 找不到存储过程 'select * from TEMP_byhktb20191213104416697'

 

set @strSql1 = 'select * from '+ @TEMP_byhktb
print @strSql1    
exec @strSql1
set @strSql1 = 'drop table '+ @TEMP_byhktb
print @strSql1    
exec @strSql1
    

 

 

原因:

exec 需要括号   
exec (@strSql1)
posted @ 2019-12-13 10:49  NULL66  阅读(507)  评论(0)    收藏  举报