当前位置:网站首页>MySQL数据库DML操作练习
MySQL数据库DML操作练习
2022-06-22 18:24:00 【火眼猊】
1.创建表:
创建员工表employee,字段如下:
id(员工编号),name(员工名字),gender(员工性别),salary(员工薪资)
2.插入数据
1,‘张三’,‘男’,2000
2,‘李四’,‘男’,1000
3,‘王五’,‘女’,4000
3.修改表数据
3.1 将所有员工薪水修改为5000元
3.2将姓名为张三的员工薪水修改为3000元
3.3将姓名为李四的员工薪水修改为4000元,gener改为女
3.4 将王五的薪水在原有基础上增加1000元
CREATE TABLE IF NOT EXISTS employee(
id INT,
name VARCHAR(20),
gender VARCHAR(2),
salary INT
);
INSERT INTO employee VALUES(1,'张三','男',2000),
(2,'李四','男',1000),
(3,'王五','女',4000);
UPDATE employee SET salary = 5000;
UPDATE employee set salary = 3000 WHERE name ='张三';
UPDATE employee SET salary = 4000 , gender='女' WHERE name='李四';
UPDATE employee SET salary= salary +1000 WHERE name='王五';
边栏推荐
- canvas给图片画框框
- Wavelet transform DB4 for four layer decomposition and signal reconstruction matlab analysis and C language implementation
- 在线生成占位图片
- delegate
- 小甲鱼老师《带你学C带你飞》的后续课程补充
- Some problem records of openpnp using process
- K个一组翻转链表[链表拆解/翻转/拼装]
- Agent model of structured model
- How to use yincan IS903 to master DIY's own USB flash disk? (good items for practicing BGA welding)
- 详解openGauss多线程架构启动过程
猜你喜欢

84.(cesium篇)cesium模型在地形上运动

ActiveReports报表实战应用教程(十九)——多数据源绑定

Focal and global knowledge distillation for detectors

Xintang nuc980 usage record: basic description of development environment preparation and compilation configuration

K8s deploy MySQL

Explain in simple terms the bloom filter

1.2----- mechanical design tools (CAD software) and hardware design tools (EDA software) and comparison

Altium Designer中off grid pin解决方法

Service practice: use service to complete a download task

修改antd tree组件,使其子类横向排列。
随机推荐
Creator mode summary
Digital commerce cloud: analyze the design idea of B2B2C multi-user mall system architecture, and open a new era of intelligent mall
NRF51822外设学习
08_ One word sobers you up
Ts as const
Pat a 1093 count Pat's (25 points)
The custom control autoscalemode causes the problem of increasing the width of font
记可视化项目代码设计的心路历程以及理解
84. (cesium chapter) movement of cesium model on terrain
Div horizontal layout
Altium Designer中off grid pin解决方法
Agent model of structured model
vim中快速缩进用法
Human Pose Estimation浅述
2.什么是机械设计?
0.1----- process of drawing PCB with AD
0816 shortcomings of Feida (improvement direction)
生产系统SQL执行计划突然变差怎么办?
08_一句话让你人间清醒
小波变换db4进行四层分解及其信号重构—matlab分析及C语言实现