SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mysql DB Restore

    Hi All,

    Unfortunately, we have updated 1000 records in mysql db 2 days back. Is it possible to revert back the data before updating 1000 records?

    Please let me know.

    OS: Suse Linux
    Mysql: 5.0

    Thanks,
    Vinay

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,214
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    only if you have a backup, or if the update is algorithmic

    for instance, if you did this --
    Code:
    UPDATE daTable
       SET somecolumn = somecolumn + 937
     WHERE someothercolumn = 'somevalue'
    then you can back out these changes by doing this ----
    Code:
    UPDATE daTable
       SET somecolumn = somecolumn - 937
     WHERE someothercolumn = 'somevalue'
    otherwise you are s.o.l.
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •