php - mysql error 1064 when changing structure of date from datetime to VARCHAR -
there issue when try change structure of 1 of table in mysql user db table , has many fields , 1 of them register date field
it set datetime , trying change varchar using phpmyadmin best way know using limited mysql / phpmyadmin expertise.
alter table abnhd_user change registerdate registerdate varchar not null default '0000-00-00 00:00:00'
when try change datetime varchar, following error
#1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'not null default '0000-00-00 00:00:00'' @ line 1
you executed query
alter table abnhd_user change registerdate registerdate varchar not null default '0000-00-00 00:00:00'
but mysql doesn't have default value '0000-00-00 00:00:00'
varchar use below sql
change varchar
alter table abnhd_user modify registerdate varchar(30);
Comments
Post a Comment