当前位置:网站首页>MySQL数据库 - 单表查询(二)
MySQL数据库 - 单表查询(二)
2022-04-23 19:28:00 【x 心 动】
第1关:带 LIKE 的字符匹配查询
USE Company;
######### Begin #########
select Name ,Salary
from tb_emp
where Name like 'C%';
######### End #########
第2关:查询空值与去除重复结果
USE Company;
######### Begin #########
select *
from tb_emp
where DeptId IS NULL;
######### End #########
######### Begin #########
select distinct Name
from tb_emp;
######### End #########
第3关:带 AND 与 OR 的多条件查询
USE Company;
######### Begin #########
select *
from tb_emp
where DeptId='301' and Salary>3000;
######### End #########
######### Begin #########
select *
from tb_emp
where DeptId='301' OR DeptId='303';
######### End #########
版权声明
本文为[x 心 动]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_45623072/article/details/124055761
边栏推荐
- An idea of rendering pipeline based on FBO
- Openlayers 5.0 thermal diagram
- Codeworks round 783 (Div. 2) d problem solution
- MySQL practical skills
- Openlayers 5.0 reload the map when the map container size changes
- MySQL syntax collation
- 数据分析学习目录
- FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数
- PostgreSQL
- 精简CUDA教程——CUDA Driver API
猜你喜欢
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
2021-2022-2 ACM集训队每周程序设计竞赛(8)题解
MFCC: Mel频率倒谱系数计算感知频率和实际频率转换
MySQL syntax collation
MySQL syntax collation (4)
Oracle配置st_geometry
为何PostgreSQL即将超越SQL Server?
Zero base to build profit taking away CPS platform official account
Garbage collector and memory allocation strategy
Redis optimization series (III) solve common problems after master-slave configuration
随机推荐
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
How to uninstall easyton
坐标转换WGS-84 转 GCJ-02 和 GCJ-02转WGS-84
Thoughts on the optimization of examination papers in the examination system
Command - sudo
Common processing of point cloud dataset
Decompile and get the source code of any wechat applet - just read this (latest)
JS controls the file type and size when uploading files
An example of using JNI to directly access surface data
Build intelligent garbage classification applet based on Zero
Some ideas about time-consuming needs assessment
对普通bean进行Autowired字段注入
Machine learning catalog
Codeforces Round #783 (Div. 2) D题解
SSDB Foundation
Strange passion
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
5 minutes to achieve wechat cloud applet payment function (including source code)
HTTP cache - HTTP authoritative guide Chapter VII
RuntimeError: Providing a bool or integral fill value without setting the optional `dtype` or `out`