主要就是把表A中C值为5的B的值写入到表E中的F去.大概就是这个意思~最好还是有说明~因为刚学不会用存储过程~老大们帮帮忙~

解决方案 »

  1.   


    insert into E(F) select B from A where C=5
      

  2.   

    上面最简单的方法就是直接用。
    insert into ..select...语法来进行插入表B
      

  3.   

    引用 4 楼 stning 的回复:
    引用 1 楼 yangpeiyu 的回复: 
    SQL code  
    insert into E(F) select B from A where C=5  
      
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
      

  4.   

    如果表E存在 insert into E(F) select B from A where C=5
    如果表E不存在 select B as F into E from A where C=5
      

  5.   

    insert into E(F) select B from A where C=5   
    这样的话有错误吗??
    如果where C=5的记录是多条的话!!会不会有问题了??
      

  6.   

    谢谢1楼不过要是我还是要其他他的话好像就不能用这个了,要是我还想要在表中E加上G为TEXTBOX1.TEXT的值的话怎么办呀~~
      

  7.   

    要是我还是要在E表中写入G值为TEXTBOX1.TEXT怎么写呀~
      

  8.   

    原来这样字就行了~~
    insert into E(F,G) select B,'"+TEXTBOX1.TEXT+"' from A where C=5