我想創建一個具有生日日期的表,該列不應該爲空,並且我想添加默認值爲1970-01的日期-01,我試過,但它提供了在MySQL控制檯錯誤:在mysql中創建表語句中將某列設置爲某個日期
create table __update_my_status.__user
(
__user_id int unsigned auto_increment,
__email varchar(100) collate utf8_bin not null,
__password varchar(30) collate utf8_bin not null,
__first_name varchar(50) collate utf8_bin not null,
__last_name varchar(50) collate utf8_bin not null,
__date_of_birth date default DATE ('1970-01-01'),
__profile_image blob,
constraint __pk_user_id primary key (__user_id)
);
錯誤是:ERROR 1064(42000):你在你的SQL語法錯誤;檢查對應於你的MySQL服務器版本使用附近「(」 1970-01-01「)正確的語法手冊, __profile_image一滴, 約束__pk_user_id初步」在行8
我使用MySQL 5.1中.58在Ubuntu 11.10上