rt.

解决方案 »

  1.   

    insert ... select ... union all select ...;
      

  2.   

    mysql?
    create table tt
    select ......
      

  3.   

    or
    insert into tt
    select ....
      

  4.   

    用的是mysql。
    那位能给个实际的例子看看。谢谢了,我初学数据库,很多东西都不懂。
    比如有3个表,需要计算3个表中每一个表某一列数据更新后的和然后自动将3个结果相加更新到第4个表中。
      

  5.   

    示例:
    update b4 set f1=(
    select sum(f1) as newf1 from (
    select f1 from b1
    union all
    select f1 from b2
    union all
    select f1 from b3) a)
      

  6.   

    union和union all只是简单的进行了汇总,没有进行运算的。我说的加只是一个例子有可能是表1中的数开平方*表2中的数的平方+表3中的数据。
    再次感谢各位了。
      

  7.   

    要求讲清楚
    update b4 set f1=(
    select sqrt(sum(f1))*power((select sum(f1) from b2),2)+
    (select sum(f1) from b3)  from b1)