日期:2014-05-18  浏览次数:20868 次

请问这句命令应该如何调用?谢谢
这个是一句SQL SERVER删除临时表的命令,如果使用C#调用这句命令,请问应该如何调用?
if object_id('tempdb..#tempTable') is not null 
Begin
  drop table #tempTable
End



------解决方案--------------------
C# code
string strsql="if object_id('tempdb..#tempTable') is not null "+
+"Begin"+
  +"drop table #tempTable"+
"End"
SqlCommand cmd=new SqlCommand(strsql,sqlconn)
cmd.ExcuteScalre()