oracle 临时表
CREATE GLOBAL TEMPORARY TABLE tempp (uni_no char(40) Primary key,item_name varchar2(100),price NUMber(7,2))
ON COMMIT PRESERVE ROWS
这样建好tempp临时表后,在delphi里这样操作
procedure TForm2.Button1Click(Sender: TObject);
var
ttt:string;
begin
ttt:='insert into tempp (uni_no,item_name,price) select uni_no,item_name,price from product where item_name like '+'%'+edit1.text+'%';
dm.Sdt.Active:=false;
dm.Sdt.DataSet.CommandText:=ttt;
dm.Sdt.Execute;
select * from bbb a,tempp b where a.uni_no=b.uni_no
dm.Sdt.Active:=false;
dm.Sdt.DataSet.CommandText:=ttt;
dm.Sdt.Active:=true;
当第二次按下Button1时报错,是因为tempp中的内容没清掉,请问怎样清tempp中的内容. trucate能在客户端用吗.我怎么用不起来.