0

Using java to connect to a mySQL database, if I use a update query like

Update <table_name> set SID='143' where SATR='temp';

and query.execute() return two, that is two entries with SATR as 'temp', but if I check the database no change !

2 Answers 2

4

Have you turned off auto-commit but forgotten to explicitly call commit() by any chance?

Sign up to request clarification or add additional context in comments.

Comments

1

If you are not getting any exceptions,you may call commit() method.

auto-commit option may be off.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.