Why does Oracle SQL Developer use such strange delete criteria? -


when deleting rows in grid view, message panel indicates sql developer issues delete command.

delete "mh"."t" rowid = 'aabug+aaeaaeztraaa'                        , ora_rowscn = '1220510600909'                        , ( "a" null or "a" not null ) 

it seems specifying rowid should sufficient identify row, so

  • why specify ora_rowscn?
  • and more befuddling, why null / not null clause?

the rowid physical address of row. if 1 row deleted , row inserted, new row have same rowid old row. if data in row had been modified, possible rowid have changed. ora_rowscn criteria ensures neither of these have happened. allows sql developer alert if session had modified data since read can confirm still want delete row.

i'm @ loss a null or not null predicate adding. if first predicate, guess standard 1 = 1 predicate folks add queries dynamically built simplify process of building sql statement dynamically. doesn't fit being last predicate in query. a primary key of table?


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -