mybatis一次动态删除多个表数据

sql中需要加上分号,表示一天sql语句的结束:
<delete id="deleteBussinessData" statementType="STATEMENT">
    <foreach collection="tableList" item="tableName" index="index" >
        delete from ${tableName} where company_id = ${companyId};
    </foreach>
</delete>

 

上一篇:20200812001 - SQL openquery 传参数


下一篇:今天分享经典sql语句大全 收藏更好