问一个问题
怎样判断SQLSERVER里临时表是否存在
用在delphi里写

解决方案 »

  1.   

    你提的问题的答案应该是:
    if exists (select * from tempdb..sysobjects where name like '#mytemp%')以上的#mytemp是你创建的临时表的名字。
    在delphi 中一下试
      

  2.   

    在SQL里面写存储过程,返回结果到Delphi中.
      

  3.   

    在SQL里面写存储过程怎样写,存储过程我还没有学会
      

  4.   

    with adoquery1 do begin
      close;
      sql.clear;
      sql.add('select * from tempdb..sysobjects where name like '#mytemp%'');
      open;
      if recordcount<>o then//说明不存在
    end;