临时表与正式表之间的复制

来源:互联网 发布:为什么 上大学 知乎 编辑:程序博客网 时间:2024/06/01 23:26

        StringBuffer returnValue = new StringBuffer(300);
        returnValue.append(" INSERT INTO vehicle_charge_temp( ");
        returnValue.append(" RELATION_ID,");//费用关联编号
        returnValue.append(" VEHICLE_NO,");//
        returnValue.append(" EMPLOYEE_CODE )");//
        returnValue.append(" (SELECT  ");
        returnValue.append(" RELATION_ID,");//费用关联编号
        returnValue.append(" VEHICLE_NO,");//
        returnValue.append(" EMPLOYEE_CODE ");//
        returnValue.append(" FROM vehicle_charge ");
        returnValue.append(" WHERE ");
        returnValue.append(" RELATION_ID='"+accident_code+"')");
        return returnValue.toString();

原创粉丝点击