Skip to main content
8 events
when toggle format what by license comment
Apr 29, 2016 at 8:13 comment added Mike Chamberlain Many excellent answers to this question, and this was no exception.
Apr 29, 2016 at 2:02 comment added slebetman @jpmc26: By looping the database I mean constructing a query to update all affected rows. Sometimes a single WHERE suffice. But I've seen unholy structures that requires subselects into the same table to get all affected rows without affecting rows that should not change. I've even seen structures where a single query can't do the job (the entity that needs change resides in different columns depending on row)
S Apr 28, 2016 at 13:39 history suggested Toby Speight CC BY-SA 3.0
Some spellings and grammar; fix a few inconsistencies
Apr 28, 2016 at 11:42 review Suggested edits
S Apr 28, 2016 at 13:39
Apr 28, 2016 at 5:14 comment added jpmc26 @slebetman You should never have a code side loop to update multiple rows in a single table, regardless of whether it's normalized. Use a WHERE clause. Of course, these can still go wrong, but it's less likely in a normalized situation since you only have to match one row via primary key.
Apr 26, 2016 at 23:28 comment added slebetman Unmentioned but I think an important point to programmers is that editing one "thing" requires editing of only a single row rather than having to loop the entire database to find and replace that single thing.
Apr 26, 2016 at 20:21 review First posts
Apr 27, 2016 at 21:25
Apr 26, 2016 at 20:20 history answered Jim CC BY-SA 3.0