Friday, July 17, 2009

How can we find row level changes while you updating a row?

When ever you are creating table, you need to give ROWDEPENDECIES with the CREATE Statement.
After you can access a psuedo column ORA_ROWSCN to get the state of perticular column. ORA_ROWSCN in your update clause to ensure that the row has not changed since the last time you read it
Example
Whene ever you access a record from table you need to get ORA_ROWSCN number store it with your record.
Update tablename set column where id=1 and ORA_ROWSCN= stored number.
if the staement execute none you can tigger the user,that the record has changed somewhere else.

0 comments: