I have a question on select count(), which may betray my lack of
database knowledge. Here goes.
I have java code driving a transaction which goes like this:
select count(*) from table
(Java code in the same transaction)
if count < 50 then ...
insert into table values(blahblah )
commit;
it seems that if many of these transactions are running concurrently,
count could exceed 50 unless oracle locks the table for inserts or
deletes.
Am I getting this wrong ? Are there better solutions ?
database knowledge. Here goes.
I have java code driving a transaction which goes like this:
select count(*) from table
(Java code in the same transaction)
if count < 50 then ...
insert into table values(blahblah )
commit;
it seems that if many of these transactions are running concurrently,
count could exceed 50 unless oracle locks the table for inserts or
deletes.
Am I getting this wrong ? Are there better solutions ?
Comment