adspace
What is phantom read and which isolation level prevents it?
Answer Posted / Pradip Kumar Dubey
"Phantom Read" occurs in database transactions when a transaction re-reads data that was inserted or deleted by another concurrent transaction. This leads to inconsistent results as the data has changed between the initial read and the final commit. The isolation level that prevents Phantom Read is "REPEATABLE_READ". In JDBC, this can be set using the Connection object's setTransactionIsolation method.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers