要求:
创建表employee,其中
职工编号:e_id 为主键、自增变量;
职工姓名:e_name为nvarchar,长度为40,不可以为空,取唯一值;
性别: ssex为nchar型,长度为2,取男或女,默认值为女;
出生日期:birthdate,date型,默认值为Null;
职称:title, nvarchar型,长度100,默认值为NULL,
入职时间:enroll_date,timestamp类型,默认值为记录输入时间即当期时间;
所在部门:dept_id,tinyint(3),无符号,默认值为NULL
创建表department,其中
部门编号:dept_id,tinyint(3),主键,无符号
部门名称:dept_name char(40) 非空,唯一
我写的代码:
create table employee(
e_id AUTO_INCREMENT,
e_name nvarchar(40) not null unique,
ssex enum('女','男'),
birthdate date null,
title nvarchar(100) null,
enroll_date timestamp NULL DEFAULT CURRENT_TIMESTAMP,
dept_id tinyint(3) null unsigned
primary key(e_id));
想知道是哪里出了问题一直报错?