泪奔。。。
- SQL code
exec(' if(object_id('##tableName','u') is not null) begin truncate '##tableName' end else begin create table ##tableName ( whID,int ) end')
这里明显有错!单引号嵌套!
但是,要怎么修改才能正确啊???
在线等解答。
------解决方案--------------------
- SQL code
exec(' if(object_id(''##tableName'',''u'') is not null) begin truncate table ##tableName end else begin create table ##tableName ( whID int ) end')