mybaits判断要查询的表是否存在

Service层


实现类:



mybatis配置文件

    <select id="selectTableByName" parameterType="java.util.Map" resultType="String">
        show TABLES like #{tablename}
      </select>



-----------------------------------------运行结果--------------------------------------

如果表不存在,则返回空。

猜你喜欢

转载自blog.csdn.net/yu799225625/article/details/52355087
今日推荐