到底是什么意思啊?insert b(字段) select 一个字段  from a

解决方案 »

  1.   

    插入?insert b (字段) select 一个字段  from a修改?update b set 字段=a.字段 from a where b.id=a.id
      

  2.   

    a表字段为  id,clsbh,cph,B表字段为 id,clsbh,djrq,fsrq,bz.  用存储过程实现,把a表的所有clsbh都添加到b表的clsbh里
      

  3.   

    我不知道你的用存储过程实现是什么意思,把表名作为参数?没这个必要吧。CREATE PROCEDURE pro_name
    as
        insert b.id,b.clsbh
        select a.id,a.clsbh from a
    go
      

  4.   


    a表字段为  id,clsbh,cph,B表字段为 id,clsbh,djrq,fsrq,bz.  用存储过程实现,把a表的所有clsbh都添加到b表的clsbh里
    ----------------------------------假设两表通过ID字段关联
    update b set b.clsbh = a.clsbh from a join b on a.id = b.id
      

  5.   

    问题有点不清楚,我想不是这么简单吧!
    CREATE PROCEDURE p_name
    as
        insert b.id,b.clsbh
        select a.id,a.clsbh from a
    go
      

  6.   

    update b set b.clsbh = a.clsbh from a where b.id = a.id