August 29th, 2000, 06:07 AM
I have a database with a date field. I want to change it to a text field which can accept null values. What do I do?
August 29th, 2000, 08:00 AM
There is probably an easier way than this but if all else fails - do a dump of the entire table including the structure, change the type of the field - delete your old table and insert the dump (including new table structure) into the 'insert SQL queries' textarea in phpMyAdmin and click GO ! - you should keep all of your data intact assuming the text field is big enough to accommadate the old date data.
Obvious hint - make a copy of your DB first!
August 29th, 2000, 12:25 PM
this should work
alter table tableName change fieldName1 fieldName2 text;