We have come across a requirement where we need to fetch one record from the table and update that record only( Flag turned to Read) .
1. How can i fetch one record only, out of n records having FLAG value Unread .
--> Can i use Select top 1 ..? As the RDBMS we are interacting with is Oracle and oracle doesn't understand anything by TOP...
Kindly correct me if i am wrong...
Selecting a single record is not an issue as i can do the same thing using rownum in oracle .
select * from EMPMASTER where flag = 'Y' and rownum < 2.
It will return me only 1 record with flag value 'Y'.
2. Now Issue is here, suppose i got the first record but how can i update that record only(To turn the flag Read)...because as per update syntax it will update all the records with flag unread irrespective of this thing that XI has picked that record or not.
or is it so that update will work only on the just read record.
I hope i have made the doubts clear.....Waiting for valuable responses..