当前位置:网站首页>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
边栏推荐
- 为何PostgreSQL即将超越SQL Server?
- Solve the problem of invalid listview Click
- js 计算时间差
- DevOps集成-Jenkins 服务的环境变量和构建工具 Tools
- Transaction processing of SQL Server database
- uIP1.0 主动发送的问题理解
- Garbage collector and memory allocation strategy
- Common processing of point cloud dataset
- All table queries and comment description queries of SQL Server
- js获取本机ip地址
猜你喜欢
MySQL syntax collation (2)
ESP8266-入门第一篇
Garbage collector and memory allocation strategy
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
On the forced conversion of C language pointer
Decompile and get the source code of any wechat applet - just read this (latest)
JVM的类加载过程
The platinum library cannot search the debug process records of some projection devices
An idea of rendering pipeline based on FBO
Oracle配置st_geometry
随机推荐
[webrtc] add x264 encoder for CEF / Chromium
C学习完结
考试系统进入试卷优化思路
Redis core technology and practice 1 - start with building a simple key value database simplekv
MFC获取本机IP(网络通讯时用得多)
Class loading mechanism
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
深度分析数据恢复原理——那些数据可以恢复那些不可以数据恢复软件
An algorithm problem was encountered during the interview_ Find the mirrored word pairs in the dictionary
Lottery applet, mother no longer have to worry about who does the dishes (assign tasks), so easy
高效的串口循环Buffer接收处理思路及代码2
uIP1.0 主动发送的问题理解
深度学习——特征工程小总结
Intuitive understanding of the essence of two-dimensional rotation
Redis optimization series (III) solve common problems after master-slave configuration
MySQL syntax collation (3)
ArcMap connecting ArcGIS Server
Problems caused by flutter initialroute and home
Zero base to build profit taking away CPS platform official account
I just want to leave a note for myself