mysql> create table worker(
-> ID int(4) primary key auto_increment,
-> num int(4) not null unique,
-> d_id int(4),
-> Name varchar(20) not null,
-> Sex varchar(4) not null,
-> birthday datatime,
-> address varchar(50),
-> foreign key(d_id) references department(d_id)
-> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'datatime,
address varchar(50),
foreign key(d_id) references department(d_id)
)' at line 7
birthday datetime, 不是datatime