• Post Reply Bookmark Topic Watch Topic
  • New Topic

Update statement doesn't ... update  RSS feed

 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a simple Oracle 10g update statement I run in SQL developer.

I try to issue an update, followed by a commit, followed by a SELECT statement on what should have been updated.

I find that the SQL statement below I run after the commit does show the new value, but if I shut down SQL Developer and re-start it, then I see that nothing was actually committed.

Oracle gives me the time it took to run the statement with no errors.

The syntax is like this:

Update users set field1="some value", set field2="another value", ..... where userid="12345" ;
commit;
select * from users where userid ="12345";

--------------

Any ideas why this doesn't do the commit as expected?

Thanks.

-- Mike
 
Sona Patel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,

If you shutdown sql developer without committing then the changes done by you will not get reflected to database.

 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sona Patel wrote:Hi Mike,

If you shutdown sql developer without committing then the changes done by you will not get reflected to database.



Did you see the "commit;" line above?

My question is why doesn't this actually "commit"?

I can't leave SQL Developer open forever.

-- Mike
 
Sona Patel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike...

got that...I have downloaded sql developer. I will install it and will do what you did.
Now lets see if that is the case at my end or not.
 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...look forward to hearing about your results.
 
Sona Patel
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Mike,

I tried that on my machine with Oracle 9i.

i closed sql developer window and next time i could see modifications done by me on database.

No issues at my end with sql developer.

It may be something related to your database settings.
 
Mike London
Ranch Hand
Posts: 1340
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sona Patel wrote:Hey Mike,

I tried that on my machine with Oracle 9i.

i closed sql developer window and next time i could see modifications done by me on database.

No issues at my end with sql developer.

It may be something related to your database settings.


OK, thanks for your help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!