Sql. Text := (用Sql.Add加入)if exists(select name from sysobjects where name ='LRHZK' and xtype='u' ) begin drop table LRHZK end select * from LRHZK
ADOquery.Close; ADOquery.SQL.Text :='select count(name) as count from sysobjects where name ='''LRHZK'''' and xtype=''''u''''; ADOquery.open; if adoquery.fieldbyname(count).asinteger > 0 then....
ADOquery.SQL.Text :='if exists(...) begin';
ADOquery.Execute;
ADOquery.SQL.Text :='if exists(...) begin';
ADOquery.ExecuteSQL;
(用Sql.Add加入)if exists(select name from sysobjects where name ='LRHZK' and xtype='u' )
begin
drop table LRHZK
end
select * from LRHZK
ADOquery.SQL.Text :='select count(name) as count from sysobjects where name ='''LRHZK'''' and xtype=''''u'''';
ADOquery.open;
if adoquery.fieldbyname(count).asinteger > 0 then....