File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Rows getting locked Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Rows getting locked " Watch "Rows getting locked " New topic

Rows getting locked

Dinesh Sundrani

Joined: May 26, 2004
Posts: 5
Hi Friends
I needed some help from you regarding Oracle 9i
I have a select clause as
Select name, age from table1 where age < 18

Now does this statement lock the table or the row or anything because there is 1 more process waiting for database access?

P1 ---------- performs the above select statement
P2 ---------- displays the table content (select * from table1)

After P1 is successfully executed and all the respective table contents are displayed the flow most go to P2, but P2 is waiting infinitely

Does anybody know what the default behavior of select statement is??
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33119

When you run the statement, what kind of result set are you using? Is it an updatable one? Also, what transaction settings are you using?

I'm going to move this to JDBC as it sounds like it could apply to more databases than just Oracle.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Rows getting locked
It's not a secret anymore!