joemo,

Transactions are the safe way of doing it.

You can also return * to see the changes, or add specific fields.

Like for example:

Begin; Update users Set first_name=‘John’ Where first_name=‘john’ Returning *;

Then your Rollback; Or Commit;

So you’d see all rows you just updated. You can get fancy and do a self join and see the original and updated data if you want. I like to run an identifying query first, so I know hey I should see 87 rows updated or whatever.

Haven’t had any issues with table locks with this, but we use Postgres. YMMV.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines