• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Update statement doesn't ... update

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic