How can we implement optimistic locking , i am using Oracle as Database for my Application .
Assume that i am working on a single row of a Table .
Now please tell me how can i explicitly lock this row , so that other simultanoues users insert or update operations are not affected to this particular row .
Select for update selects a set of data locking it from updates by other transactions (i.e. pessimistic locking). Other than that there is not much extra I can really say. Have a look at the Oracle documentation for select, it has a more complete answer than I am likely to give here.