create table tmp(
id int comment '编号',
workno verchar(10) comment '工号',
name verchar(10) comment '姓名',
gender char(1) comment '性别',
age tinyint unsigned comment '年龄',
idcard char(18) comment '身份证',
entryday data comment '入职时间'
) comment ‘员工表’;
drop table user;
create table user(
id int comment '工号',
name varchar(10) comment '姓名',
age tinyint comment '年龄',
idcard char(18) comment '身份证号',
address varchar(20) comment '户籍地',
entrydata date comment '入职时间'
);
insert into user (id, name, age, idcard, address, entrydata) VALUES
(1,'陈嘉颖',23,'440572200105012215','广东','2023-4-25'),
(2,'陈',20,'440572200105012215','广东','2023-4-25'),
(3,'嘉',21,'440572200105012215','广东','2023-4-23'),
(4,'颖',22,'440572200105012215','广东','2023-4-25'),
(5,'陈建锐',23,'440572200105012215','广东','2023-4-24');
select database() ;
alter table user add workno int comment '工号';
alter table user modify workno char(2);
alter table user change workno worknum char(10);
desc user;
show create table user;