要求:
mysgl>create database mydb8 worker;
mysq> use mydb8 worker;
mysgl>create table t worker(
department id int(11)not null comment'部门号',
worker id int(11)primary key not null comment'职工号',
worker date date not null comment'工作时间',
wages float(8,2)not null comment'工资',
politics varchar(10)not nu1l default'群众'comment'政治面貌',
name varchar(20)not nullcomment'姓名',
borth date date not null comment'出生日期'
);
mysql> insert into t_worker values (101,1001,'2015-5-4',7500.00,'群众','张春燕','1990-7-1');
mysql> insert into t_worker values (101,1002,'2019-2-6',5200.00,'团员','李名博','1997-2--8');
mysql> insert into t_worker values (102,1003,'2008-1-4',10500.00,'党员','王博涵','1983-6-8');
mysql> insert into t_worker values (102,1004,'2016-10-10',5500.00,'群众','赵小军','1994-9-5');
mysql> insert into t_worker values (102,1005,'2014-4-1',8800.00,'党员','钱有财','1992-12-30');
mysql> insert into t_worker values (103,1006,'2019-5-5',5500.00,'党员','孙菲菲','1996-9-2');
查表:
mysql> select * from t_worker;