有二个表:表A、表B,二个表都是相同字段、
请帮如何把表A的所有数据拷到表B中,并同时清空表A

解决方案 »

  1.   

    bde中的这样 的控件
    或用sql语句
    insert into
    as select
      

  2.   

    ADO方式请帮忙写出表A数据拷到表B并清空表A
      

  3.   

    insert into B
    select * form A
    union delect A
      

  4.   

    with Adoquery1 do
    begin
      Close;
      SQL.Clear;
      SQL.Add('insert into B select * from A');
      SQL.Add('TRUNCATE TABLE A');
      ExecSQL;
      Close;
    end;
      

  5.   

    with Adoquery1 do
    begin
      Close;
      SQL.Clear;
      SQL.Add('insert into B select * from A');
      SQL.Add('delete from TABLE A');
      ExecSQL;
      Close;
    end;
      

  6.   

    while ADOQuery1.count>=0 do 
    begin
    with Adoquery1 do
    begin
      Close;
      SQL.Clear;
      SQL.Add('insert into B select * from A');
      SQL.Add('delete from TABLE A');
      ExecSQL;
      Close;
    end;
    end;这样试试我也没有测试过
      

  7.   

    with data.ADOQuery13 do
    begin
    close;
    sql.Clear;
    SQL.Add('insert into sykp select * from lsb');
    sql.Add('delete from lsb');
    execsql;
    end;
    为什么提示from子句语法错误