Reputation: 9020
Suppose that, after I establish a connection of my java application with my underlying MySQL database, and then open MySQL workbench and update some rows in a table, and then retrieve the fields of that table in the java client, will those changes synchronize with the java program. In other words, will those changes appear in the results of queries I carry out in the java program?
In general, after establishing a connection between a java application and a MySQL database, are the updates, deletions, alterations etc. carried out in the database by using the MySQL DBMS (and not the java program) visible to the program?
Upvotes: 0
Views: 112
Reputation: 5612
Only if you run your query again.
Specifically, if you run something like this:
ResultSet resultSet = myStatement.executeQuery("select * from some_table");
and then you update the database (either from the command line / database client), then no. you will need to run your query again to see the changes you made.
Upvotes: 1
Reputation: 7335
In general, yes.
If they are not showing up, my first guess would be that you are not commit
ing the updates in the workbench
Upvotes: 2