31
juzles
8y

Never forget the where clause in an UPDATE query.......

Comments
  • 4
    If we can have a MOTD for mysql, it should have this message.
  • 6
    Pro tip: always begin your update queries as select and only when you select only what you want to update - put the update in.
  • 0
    Test in development environment.
  • 2
    personally I always break the query until I'm done writing it where nothing will screw up
  • 1
    UPDATE ALL THE THINGS!
  • 0
    Pro tip, use triggers to output a copy of each row to a backup table, prior to delete and updates.
Add Comment