Home  >  Article  >  Database  >  java jdbc连接mysql数据库插入null值问题

java jdbc连接mysql数据库插入null值问题

WBOY
WBOYOriginal
2016-06-06 09:44:592354browse

mysqlnull值jdbcjava空值

ps.setFloat(8, device.getLatitude());如果device.getLatitude()返回的是null就报错,也就是说setFloat不能插入空值,而setString()方法就可以,不知道为什么请高手指点,谢谢!!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn