Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: BINARY_CHECKSUM IN ORACLE
>Please expand. (If the uniqueness MUST BE based on a hash, I agree with
>your assessment. If it's just plain uniqueness, then I'm intrigued by
>your answer.)
Well, it's not really *uniqueness* that BINARY_CHECKSUM ensures (actually it doesn't,) it's the fact that checksummed row was or wasn't changed since checksum was last computed. ROWID uniquely identifies the row, but it doesn't change when row changes (except a few special cases.) BINARY_CHECKSUM allows you to capture hash of the row as of the time of the call and you can then use it to quickly find changed rows or check if this particular row was changed since you captured the checksum. Best use of this function and its case-insensitive cousin CHECKSUM is probably optimistic locking (OWA_OPT_LOCK package serves the same purpose.)
Hth,
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm)
http://www.dynamicpsp.com
Received on Tue May 02 2006 - 13:59:40 CDT
![]() |
![]() |