When we issue a SELECT statement against the database to query some records, no locks are placed on the selected rows. Only those records which have been changed but not yet committed are locked Others will be able to read those records as they appeared before the change. When you want to lock a set [...]
The task of retrieving the top or bottom N rows from a database table (by salary, sales amount, credit, etc.) is often referred to as a “top-N query.” I am going to use table EMP in the example of this article. This table belongs to the SCOTT schema of the Oracle starter database provided with [...]