02-24-11, 05:41 #1Registered User
- Join Date
- Feb 2011
- Miami, Florida
Unanswered: Remove all data from Column without deleting field
I had a default value of "1" in a field and this populated all 10000+ records.
I have now removed this value as it is not needed but the specific field (column) is populated with "1". If I try and delete it states that it will remove the field and data.
Is there a way just to remove all the data from that one field (column)?
02-24-11, 06:15 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
run some SQL
update mytable set mycolumn = <avalue> where mycolumn = 1;
<avalue> could be NULL
update mytable set mycolumn = NULL where mycolumn = 1;
to run this you need to open the query designer
seelct the SQL view (button top left underr 'file'
then paste the above SQL
change mytable for the name of your table containing the column
change mycolumn for the name of the column in the table
execute the SQL
if this is the first time you have done such things then take a backup of the table first, ideally work on that backup, then copy the corrected table over the original or apply the same changes to the original table.. your choiceI'd rather be riding on the Tiger 800 or the Norton