mysql 增删改查sql
1.增加字段在某个字段之后
alter table bi.r_meeting_bi2 add staff_id varchar(50) null after meeting_name; #在meeting_name字段之后增加字段 staff_id varchar(50)
2.修改某个字段在某个字段之后
alter table r_meeting_bi2 change meeting_name meeting_name1 varchar(300) null; #把字段meeting_name 改为 meeting_name1
3. 往表里插入多条数据
INSERT INTO bi.call_landline_info(id,name,code) VALUES(1, '肖瑶', '8039'),
(2, '隋欣茹', '8035'),
(3, '张滋本', '8010');
4.创建数据库
CREATE DATABASE library;
5.创建表
create table expert2.s_job_scheduler
(
id bigint auto_increment comment '编号' primary key,
expert_id varchar(50) null comment '专家id',
title varchar(200) null comment 'title',
is_current int null comment '1.现任 2.前任,0.不知道职位情况',
company_name varchar(200) null comment '公司名字',
position varchar(200) null comment '职位',
start_time date null comment '职位开始时间',
end_time date null comment '职位结束时间',
create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
status int default 1 null comment '处理的状态',
constraint expert_title_index
unique (expert_id, is_current, company_name, position, status)
)
comment '任务调度的配置' charset = utf8mb4;
浙公网安备 33010602011771号