两个table
表结构 
tbA                         tbB
--------- 
program                    program  haha
a                            a       1
b                            b       2
c                            c       3
f                            d       4
g                            e       5 现在要生成表
tbC
program  haha
a          1
b          2
c          3
f          null
g          null用最好的方法实现~~~~~~~~~讨论讨论

解决方案 »

  1.   

    create table tbCinsert tbc (program) slelect program from tbAupdate tbc set haha=tbb.haha from tbb where tbb.program  =tbc.program  
      
    *****************************************************************************
    欢迎使用CSDN论坛阅读器 : CSDN Reader(附全部源代码) 
    http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
      

  2.   

    大哥不是SQL。。是SQL还搞这么复杂啊