Correction status:qualified
Teacher's comments:
1、执行SQL语句创建数据库及数据表;
2、插入数据行
CREATE DATABASE oa CHARACTER SET utf8 COLLATE utf8_general_ci; USE oa; CREATE TABLE user( `id` INT UNSIGNED AUTO_INCREMENT, `name` VARCHAR(20) NOT NULL, `gender` TINYINT UNSIGNED NOT NULL, `age` TINYINT UNSIGNED, `tel` VARCHAR(11) NOT NULL, `email` VARCHAR(50) NOT NULL, `qq` VARCHAR(13), `address` VARCHAR(50), `birthday` DATE, `department` TINYINT UNSIGNED, PRIMARY KEY (id) )ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `user`(`name`,`gender`,`age`,`tel`,`email`,`qq`,`address`,`birthday`,`department`) VALUES('小强',0,123,'122334545','134@qq.com','13441','班尼路','1912-02-12',2);
总结:
1、创建数据表前,要先选择数据库;
2、表名及字段名使用1左边的点号,数据行中的字符串使用单引号
3、关键词大写,自定义名称小写;
4、枚举类型内需加单引号,易出错,可用tinyint代替