int和Integer的区别
来源:互联网 发布:详细设计说明书 算法 编辑:程序博客网 时间:2024/05/16 07:26
区别是非常的大。。。
在更新数据库的时候尤为明显
int如果不给值那么就是0
Integer不给值就是null
slq中 <if test="id != null">AND t.id = #{id}</if>
如果在bean中声明的属性为int,恭喜你,当你进行crud的时候,就会查不到,更新不了。。。
因为0!= null
所以slq结果:select * from table where id=0 and name="张三",其实这会我根本就没给id赋值。。。
0 0
- int 和 Integer 的区别
- int 和 Integer 的区别
- int和Integer的区别
- int和Integer的区别
- int 和 integer的区别
- Integer和int的区别
- Integer 和 int 的区别
- int和integer的区别
- int和Integer的区别
- int 和integer的区别
- int 和 Integer的区别
- int 和integer的区别
- int 和integer的区别
- Integer和Int的区别
- int 和integer的区别
- int 和integer的区别
- Int 和integer的区别
- int 和Integer的区别
- Java中读取一个TXT文件中的每行内容的前5个字符,并保存到另一个TXT文件中。
- syetem("pause")与getchar()在解决闪退问题时的区别
- 多个tableView共用一个Controller
- android 微博 微信登录
- NYOJ-108-士兵杀敌(一)
- int和Integer的区别
- Android官方开发文档Training系列课程中文版:目录
- maven 常用命令
- 直接插入排序
- C++怎么把字符串中的小写变为大写
- 最小点覆盖 poj2226 Muddy Fields
- android 6.0权限请求
- Linux安装redis
- 开始学习C语言C++在这里记录自己的成长。简单的两变量交换问题