Home >Database >Mysql Tutorial >mysql-jdbc ececuteUpdate的一些疑问

mysql-jdbc ececuteUpdate的一些疑问

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 09:35:001234browse

mysqljdbc数据库

首先我设置了取消默认提交,而且注释了connection.commit(),然后我执行
statement.executeUpdate ("insert into news values(88,'yui','uuu','2015-12-18')"); 语句发现数据库中没有变化,
但是我接着写ResultSet rs= statement.executeQuery("select * from news where id=88"); 语句却可以正常获得(88,'yui','uuu','2015-12-18')这一条数据
请问为什么,本人初学
图片说明

<code></code>
<code></code>
<code></code>
<code></code>
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