ppepii
ppepii

Reputation: 104

Change field default in phpmyadmin

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

Answers (1)

Anonymous Duck
Anonymous Duck

Reputation: 2978

Try update command resource,

UPDATE table_name
SET column_name = NULL
WHERE column_name = '0000-00-00'

Upvotes: 2

Related Questions