Home  >  Article  >  Database  >  java-Java连mysql的一些问题

java-Java连mysql的一些问题

WBOY
WBOYOriginal
2016-06-06 09:37:31825browse

mysqljava

用Java查询mysql数据库时,相同的一条sql语句在Workbench里能够查询出结果,但在Java代码里无法查出结果。如下图:
图1.Workbench里能查出结果图片说明
图2.Java里相同的语句无法查出结果(Workbench的sql语句是从Java这边复制粘贴的)图片说明
最后sql生成的ResultSet对象getRow()返回0
请问有前辈指导问题出在哪么?

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