Reputation: 104
Hi so i created a date type field in phpmyadmin and forgot to set its default to NULL, so i returned and edited the default to null my question is how to change the data in the fields affected from the creation of the field? In other words all data in the field is currently '0000-00-00' so i want to change this to NULL. I know i'm supposed to submit some code but nothing comes to mind since I'm just starting to learn SQL.
Upvotes: 0
Views: 328
Reputation: 2978
Try update command resource,
UPDATE table_name
SET column_name = NULL
WHERE column_name = '0000-00-00'
Upvotes: 2