Following ROWIDs Through an Oracle Unique Index Update
SQL> create table franck ( val int unique ); Table created. SQL> insert into franck values (-1) , (1) ; 2 rows created. SQL> select val from franck; VAL ---------- -1 1 SQL> update franck set val=-val; 2 rows updated.
- ▪SQL> create table franck ( val int unique ); Table created.
- ▪SQL> insert into franck values (-1) , (1) ; 2 rows created.
- ▪SQL> select val from franck; VAL ---------- -1 1 SQL> update franck set val=-val; 2 rows updated.
DEV.to (Top) files mainly under programming. We currently carry 4,909 of its stories.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 114176) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Franck Pachot Posted on Jul 26 Following ROWIDs Through an Oracle Unique Index Update #oracle #postgres #sql #index I've always been amazed by how Oracle Database handles updates to a unique column—performing set-based operations that don't violate the unique constraint, yet when executed row by row, it temporarily permits duplicates. SQL> create table franck ( val int unique ); Table created. SQL> insert into franck values (-1) , (1) ; 2 rows created.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV Community.