语句是:
if Exists(select name from sysobjects where name = 'CreateProc' and type = 'P')
没有drop

解决方案 »

  1.   

    改为 
    if Exists(select name from sysobjects where name = 'CreateProc' and type = 'P')
      Drop Proc CreateProc
    If下面要加上语句,再一起运行。单独运行一句话会提示错误。
      

  2.   

    if Exists(select name from sysobjects where name = 'CreateProc' and type = 'P') drop procedure CreateProc完整的写法应该是这样```你要找到并删除!!IF是判断!判断的结果当然要执行动作了```
      

  3.   

    if exists(select name from sysobjects where name = 'CreateProc' and type = 'P')
    print '1'
    else 
    print 2
    沒問題,很正常啊