zoukankan      html  css  js  c++  java
  • 表复制语句

    表复制语句有两种格式

    1.Insert into Table2(field1,field2,...) select value1,value2,... from Table1

    2.SELECT vale1, value2 into Table2 from Table1

    insert into sl_recivable_origin_sub(select null, ro.orgin_recivable_no as origin_no,sov.rock_info_own as origin_sub_info_own
    		,SUM(sov.receipt_volume) as origin_sub_volume,null as origin_sub_count_volume,sov.sales_order_price as origin_sub_unit_price
    		,SUM(sov.sales_order_total_price) as origin_sub_amount,null as origin_sub_count_amount,null as origin_sub_count_month
    		,NOW() as origin_sub_create_time
    		 from sl_recivable_origin ro left join sl_sales_order_view sov on ro.orgin_salesorder_no = sov.sales_order_no
    		where ro.orgin_recivable_no = #{originNo} group by sov.rock_info_own)
    

      

  • 相关阅读:
    Annotation
    jdbc
    集合
    与运行环境交互
    计数排序and基数排序
    面向对象下
    面向对象
    流程控制与数组
    庆祝自己的BLOG开张
    Raspberry Pi配置为无线路由器
  • 原文地址:https://www.cnblogs.com/zhengxq21/p/10336410.html
Copyright © 2011-2022 走看看