当前位置:网站首页>MySQL winter vacation self-study 2022 11 (10)
MySQL winter vacation self-study 2022 11 (10)
2022-07-05 03:13:00 【Crane paper thousand】
-- practice
-- 1, Return the name of the Department that owns the employee , Department number
select distinct dname,dept.deptno from dept join emp on dept.deptno = emp.deptno;
-- 2, Pay more than smith Employee information
select * from emp where sal > (select sal from emp where ename = 'smith');
-- 3, Return the employee's name and manager
select a.ename,b.ename from emp a join emp b on a.mgr = b.empno;
select a.ename,b.ename from emp a,emp b where a.mgr = b.empno;
-- 4, Return the name of the employee and his / her manager whose employment date is earlier than that of his / her manager
select a.ename,a.hiredate,b.hiredate,b.ename from emp a join emp b on a.mgr = b.empno and a.hiredate<b.hiredate;
Let's start with this , Too sleepy , Make up tomorrow
边栏推荐
- Apache Web page security optimization
- The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code
- 040. (2.9) relieved
- Yyds dry goods inventory embedded matrix
- Why is this an undefined behavior- Why is this an undefined behavior?
- SQL performance optimization skills
- 1. Five layer network model
- Kubernetes - identity and authority authentication
- Master Fur
- Spark SQL learning bullet 2
猜你喜欢
Elfk deployment
SQL injection exercise -- sqli Labs
qrcode:将文本生成二维码
Yuan universe also "real estate"? Multiple second-hand trading websites block metauniverse keywords
Qrcode: generate QR code from text
Simple use of devtools
Pat class a 1160 forever (class B 1104 forever)
ELK日志分析系统
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
随机推荐
Design of KTV intelligent dimming system based on MCU
SQL performance optimization skills
How can we truncate the float64 type to a specific precision- How can we truncate float64 type to a particular precision?
Daily question 2 12
Kubernetes -- cluster expansion principle
qrcode:将文本生成二维码
Devtools的簡單使用
tuple and point
In MySQL Association query, the foreign key is null. What if the data cannot be found?
2021 Li Hongyi machine learning (1): basic concepts
El select, El option drop-down selection box
Azkaban actual combat
【微服务|SCG】Filters的33种用法
Use UDP to send a JPEG image, and UPD will convert it into the mat format of OpenCV after receiving it
Avoid material "minefields"! Play with super high conversion rate
Talk about the SQL server version of DTM sub transaction barrier function
C file in keil cannot be compiled
平台入驻与独立部署优缺点对比
Multi person online anonymous chat room / private chat room source code / support the creation of multiple chat rooms at the same time
LeetCode 237. Delete nodes in the linked list