请教各位,怎样建立基于查询的表?即在query控件中用select语句选择出结果集,执行query控件中的语句后怎样将这些得到结果永久存储(存储进表中)??(用InterBase 做后台数据库)     非常感谢赐教!!!

解决方案 »

  1.   

    较低级的方法:   用个循环一条一条增加
       while not query1.eof do
       begin
         //往另一个表中增加记录
         query1.next;
       end;
      

  2.   

    没有批量完成的办法吗??比如标准SQL语句 select * from sourcetable 
    into desttable (或#desttable 临时表)。或者象VF中的 COPY ALL TO ...
    命令一次性完成选择数据导入另一张表中???
      

  3.   


    SELECT INTO 语句创建一个新表,并用 SELECT 的结果集填充该表。新表的结构由选择列表中表达式的特性定义
    SELECT table1.*,table2.id
    INTO Newtable
    FROM table
    where table1.id=table2.id
         
      

  4.   

    Select newuser.user_name, userinfo.user_age into newtable from newuser, userinfo where newuser.user_code = userinfo.user_code
      

  5.   


      vf的表,使用select into 语句时visual foxpro driver 通不过.
      

  6.   

    先 create table ,再 Insert into ?