Meaningless Drivel is fun!*
The moose likes JDBC 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
Bookmark "Rows getting locked " Watch "Rows getting locked " New topic
Author

Rows getting locked

Dinesh Sundrani
Greenhorn

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?

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

Error
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30146
    
150

Dinesh,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rows getting locked
 
Similar Threads
Whizlabs Practice exam 1, question 10 (EJB QL)
Help with HQL statement
Update with FROM table concept
Marcus Green - Exam 2 - Question 9
package directory