Used for satements that read data(selects)
Other processes can read the data (put shared locks on the data), but no process can alter the data.(put exclusive lock on the data)
Used for statements that change data(inserts, updates, deletes)
No other processes can read the data (put shared locks on the data) or alter the data(put exclusvie locks on the page)
Used for operations that may or may not change the data (updates, deletes)
When the process first scans the data, it applies an update lock. Other processes can place shared locks, but no process can place exclusive locks or update locks on the data. If the operation placing the update lock finds data that needs to be modified, the update lock is promoted to an exclusive lock. If the operation does not find data that needs to be modified, the pdate lock is released when the scan is complete.