General J2EE: jdbc transactions????
I have the following problem.
1) Query to get the total number of entries.
3) Query and get rows 350,000 - 350,500 of 56,000,000 entries.
How can I ignore a different transactions inserts/deletes at step 2?
To count the number of entries in a table:
select count(*) from mytable
Add a where clause to count the number of rows in a selection:
select count(*) from mytable where surname='Smith'
To get a range:
select * from mytable where myid between 350000 and 350500
Check out this site: http://www.w3schools.com/sql/
The usual way to do this is kind of thing is...
Hope this makes sense.
Why use JDBC? In the long term of things you should really look to using a persistance layer for your application. I would recomend Hibernate because it has a low learning curve. Using regular JDBC in your application with the reall cool persistence tools out there doesn't make much sense to me.