关联表查收出数据后插入到新表-字段相同sql

来源:互联网 发布:nginx集群负载均衡配置 编辑:程序博客网 时间:2024/05/29 04:20
INSERT INTO applyinfo_repeal (
    business_num,
    identify_organization_id
) SELECT
    applyNumber,
    identifyOrganizationId
FROM
    applyinfo a
LEFT JOIN enterprise_applicant e ON a.app_ent_id = e.id
WHERE
    e.enterprise_name = 'test公司'
AND a.`status` = 9
AND a.create_date >= '2017-05-18'
阅读全文
0 0
原创粉丝点击