Albert D
Albert D

Reputation: 71

phpmyadmin convert all empty fields to NULL

is it possible to convert all empty fields in a database table to NULL.

one: without using a script to do it. meaning within myphpadmin?

if thats not possible

two: what would a script in php look like?

Thank you.

EDIT, this is after a database has already been created, with over 3000 rows.

Upvotes: 0

Views: 218

Answers (1)

bdf
bdf

Reputation: 247

UPDATE my_table
SET my_column = NULL
WHERE my_column = '';

Upvotes: 1

Related Questions