mybatis和mysql差异
时间: 2023-09-13 07:13:00 浏览: 108
回答: Mybatis和MySQL之间存在一些差异。首先,当将服务从部署MySQL的服务器迁移到部署Oracle的服务器时,需要修改SQL语句以符合Oracle的语法要求。特别是在Mybatis中,模糊查询的SQL语句在MySQL和Oracle之间也有差异。在配置数据源时,MySQL需要进行心跳包的配置,而Oracle则不需要(需要验证)。另外,当适配Oracle数据库时,使用Mybatis时可能会出现"Error setting null parameter"的错误。这个错误通常是由于参数中出现了null值,并且没有指定jdbcType类型的参数引起的。因此,在迁移Mybatis应用程序时,需要注意这些差异并进行相应的修改。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* [mybatis中mysql和oracle的区别](https://blog.csdn.net/weixin_39726379/article/details/113129628?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168932994216800185866834%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=168932994216800185866834&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-6-113129628-null-null.article_score_rank&utm_term=mybatis%E5%92%8Cmysql%E5%B7%AE%E5%BC%82)[target="_blank"] [.reference_item]
- *2* [Mybatis基于mysql和oracle数据库的编写差异](https://blog.csdn.net/chengp919/article/details/80087273?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168932994216800185866834%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=168932994216800185866834&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-5-80087273-null-null.article_score_rank&utm_term=mybatis%E5%92%8Cmysql%E5%B7%AE%E5%BC%82)[target="_blank"] [.reference_item]
- *3* [Mybatis基于mysql和oracle数据库的编写差异](https://blog.csdn.net/chengp919/article/details/80087273?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168932994216800185866834%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=168932994216800185866834&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm-5-80087273-null-null.article_score_rank&utm_term=mybatis%E5%92%8Cmysql%E5%B7%AE%E5%BC%82)[target="_blank"] [.reference_item]
[ .reference_list ]
阅读全文