首先判断这个表是否荐在,然后在建立,我要创建一个临时表用以下的方法不可以,不知各位还有什么别的方法,数据库为sql6.5:
tempado.SQL.Add('if exists(select * from sysobjects where name='+char(39)+'#temptable1'+char(39)+')');
tempado.SQL.Add('begin ');
tempado.SQL.Add(' drop table temptable1');
tempado.SQL.Add('end');
tempado.ExecSQL; 
tempado.SQL.Clear;
    tempado.SQL.Add(' create table #temptable1(c1 float NULL default null ,c2 float NULL ,c3 float NULL,c4 float NULL,c5 float NULL )' );
    tempado.ExecSQL;