In Repeatable Read, we can guarantee the same value can be retrieved from same record even the record is queried multiple times. However, setting isolation level is not allowed in defining view. Currently, I am trying to create a view and the SQL statement as follow SELECT * FROM TBL t1 INNER JOIN TBL t2 ON t1.SEQ = t2.SEQ + 1
.
As you see, I am querying a table twice within a session. This query can be fast, but I cannot guarantee there isn't any change in this table between these 2 query. How can I keep data consistency in this self-joining?