jim.davidson Posted November 12, 2010 Share Posted November 12, 2010 I'm new to mySQL. I have a mySQL table and data was entered into the wrong field. I need to move all data from field A to field B. What's the quickest way? Any help will be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/218511-data-in-wrong-field/ Share on other sites More sharing options...
Pikachu2000 Posted November 12, 2010 Share Posted November 12, 2010 I'd probably do it in two steps: UPDATE `table` SET `field1` = `field2` Then (after you make sure the above was successful): UPDATE `table` SET `field2` = '' Quote Link to comment https://forums.phpfreaks.com/topic/218511-data-in-wrong-field/#findComment-1133571 Share on other sites More sharing options...
jim.davidson Posted November 12, 2010 Author Share Posted November 12, 2010 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/218511-data-in-wrong-field/#findComment-1133575 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.