当前位置:网站首页>MySQL数据库 - 数据库和表的基本操作(二)
MySQL数据库 - 数据库和表的基本操作(二)
2022-04-23 19:28:00 【x 心 动】
仅供参考:
第1关:插入数据
USE Company;
#请在此处添加实现代码
########## Begin ##########
########## bundle insert the value ##########
insert into tb_emp(Id,Name,DeptId,Salary)
values(1,'Nancy',301,2300)
,(2,'Tod',303,5600)
,(3,'Carly',301,3200);
########## End ##########
SELECT * FROM tb_emp;
第2关:更新数据
USE Company;
#请在此处添加实现代码
########## Begin ##########
########## update the value ##########
update tb_emp
set Name="Nancy",DeptId=301,Salary =2300
where Id=1;
update tb_emp
set Name="Tracy",DeptId=302,Salary =4300
where Id=3;
########## End ##########
SELECT * FROM tb_emp;
第3关:删除数据
USE Company;
#请在此处添加实现代码
########## Begin ##########
########## delete the value ##########
delete FROM tb_emp where Salary>3000;
########## End ##########
SELECT * FROM tb_emp;
版权声明
本文为[x 心 动]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_45623072/article/details/124055511
边栏推荐
- Kubernetes入门到精通-裸机LoadBalence 80 443 端口暴露注意事项
- [报告] Microsoft :Application of deep learning methods in speech enhancement
- Build intelligent garbage classification applet based on Zero
- An algorithm problem was encountered during the interview_ Find the mirrored word pairs in the dictionary
- Parsing headless jsonarray arrays
- 一个简单的(基于redisson的)分布式同步工具类封装
- OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
- On the forced conversion of C language pointer
- Executor、ExecutorService、Executors、ThreadPoolExecutor、Future、Runnable、Callable
- Quick start to static class variables
猜你喜欢
Oracle配置st_geometry
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`
Audio signal processing and coding - 2.5.3 the discrete cosine transform
Using oes texture + glsurfaceview + JNI to realize player picture processing based on OpenGL es
5 minutes to achieve wechat cloud applet payment function (including source code)
JVM的类加载过程
Openharmony open source developer growth plan, looking for new open source forces that change the world!
Kubernetes入门到精通-裸机LoadBalence 80 443 端口暴露注意事项
MySQL syntax collation (3)
MySQL lock
随机推荐
一个简单的(基于redisson的)分布式同步工具类封装
深度学习环境搭建步骤—gpu
UML类图几种关系的总结
【webrtc】Add x264 encoder for CEF/Chromium
Class loading mechanism
Speculation on the way to realize the smooth drag preview of video editing software
Openlayers draw rectangle
Use of fluent custom fonts and pictures
Redis optimization series (III) solve common problems after master-slave configuration
NiO related Basics
Strange passion
How to use go code to compile Pb generated by proto file with protoc Compiler Go file
Summary of several relationships of UML class diagram
Main differences between go and PHP
arcMap 发布切片服务
JS to get the local IP address
TI DSP的 FFT与IFFT库函数的使用测试
SQL server requires to query the information of all employees with surname 'Wang'
Solve the problem of invalid listview Click
Common processing of point cloud dataset