I create a field ‘RankID’ with Int(8) (from PHPMyadmin Web GUI Structure page, I can found the column of NULL value is No; and the column of Default value is None )type in my table.
I found some of the Int default value was ‘0’. Actually, I don’t want any ‘0’ value in my table for ‘RankID’. It will cause the sort action list RankID ‘0’ at the top row of my result table.
How can I fix this issue?
Can I correct the field with Int(8) (NULL -> Yes; Default -> NULL)?
If I can correct my Int(8) as above. Then how can I update hundreds of record RankID value from ‘0’ to ‘null’?
Any comments, suggestions are appreciated.
You created the column as being
NOT NULL. The database eninge is behaving as it should.Updating the existing fields from 0 to NULL is done with following update statement.