If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to restore table data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-08, 11:11
ssabbani ssabbani is offline
Registered User
 
Join Date: Aug 2008
Posts: 1
How to restore table data

Hi All,

Hi

I've a table with column XXX having Datatype Varchar2.This table contains data.I have changed the column XXX to Datatype 'Date'.i commited the same.

But problem when i look in to the table data i lost entire data of that column and was replaced with null values. How to restore the previous data as I didn't take the backup.

Please provide the solution ASAP.

Thx & Rgds
-SS
Reply With Quote
  #2 (permalink)  
Old 08-11-08, 11:45
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
so you had a column typed as varchar and changed it to date.... Unless you have got a backup of the data I think you are stuffed.

what you could do is go back to the backup
drop any indexes
rename the old column
create a new column of type datetime
and then do an SQL update query to coerce the values from the old column to the new datetime column. you may need to use the MySQL date functions to make sure that you do the conversion correctly
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 08-12-08, 16:22
webburu webburu is offline
Registered User
 
Join Date: Mar 2008
Posts: 4
no way to be back because you don't have back up. I have a friend who is perform drop database statement in a wrong database and cannot rollback also . So lessons learned.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On