Big mistake: Update command without where clause

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • loisk
    New Member
    • Sep 2007
    • 97

    Big mistake: Update command without where clause

    Hi,

    Can anyone help me to recover or undo this problem?

    I did inadvertently run a command, 'update ..set' without where clause and changed every records. Unfortunately our backup didn't run last night.

    Is there any way to recover or undo this? Please help me....
  • loisk
    New Member
    • Sep 2007
    • 97

    #2
    I forgot to add some info:

    I am using MySQL 5.0
    Table type is MyISAM

    Comment

    • mwasif
      Recognized Expert Contributor
      • Jul 2006
      • 802

      #3
      You can not undo this operation AFAIK except you have backup.

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        To my knowledge, there is no way to undo. This should be a lesson learned.

        Learn to backup or session your changes (Using BEGIN, ROLLBACK, and COMMIT commands) or just make a habit of dumping the database before logging into it.

        Never do it again is the only advice at this point I guess. Sorry it's not much help.




        Dan

        Comment

        • loisk
          New Member
          • Sep 2007
          • 97

          #5
          I was able to put them back fortunately!
          Yesterday I was so frantic/insane enough unable to remember that I had some tags to identify certain records. Big chunk of records are now back by those tags. Thank god!
          In fact we had our departmental on-line backup, which coincidently was not running for last couple of days due to changing backup nod.

          Definitely this experience is now valuable lesson to me, not to rely on other backup but to have a habit to backup of my own.

          Thank you so much for your replies!
          Whew~~~~!

          Comment

          Working...