当前位置:网站首页>SQL learning - case when then else
SQL learning - case when then else
2022-07-05 09:27:00 【Xu Jiajia 233】
scene
There is currently one “ Student transcript ”
It is necessary to inquire which students have passed , Which failed .
Example
create table StudentScore (
name string,
score int
);
INSERT INTO StudentScore VALUES
('AAA',32),
('BBB',58),
('CCC',62),
('DDD',92);
select Inquire about
select name,
case
when score >= 90 then ' good '
when score >= 60 then ' pass '
else ' fail, '
end as test_result
FROM StudentScore;
result
边栏推荐
- Unity skframework framework (XXIII), minimap small map tool
- Nodejs modularization
- Wxss template syntax
- 2309. 兼具大小写的最好英文字母
- C # compare the differences between the two images
- 混淆矩阵(Confusion Matrix)
- 基于STM32单片机的测温仪(带人脸检测)
- 22-07-04 西安 尚好房-项目经验总结(01)
- MySQL does not take effect in sorting string types
- 植物大战僵尸Scratch
猜你喜欢
Kotlin introductory notes (VII) data class and singleton class
一文详解图对比学习(GNN+CL)的一般流程和最新研究趋势
Progressive JPEG pictures and related
A keepalived high availability accident made me learn it again
Understanding rotation matrix R from the perspective of base transformation
C语言-从键盘输入数组二维数组a,将a中3×5矩阵中第3列的元素左移到第0列,第3列以后的每列元素行依次左移,原来左边的各列依次绕到右边
Hosting environment API
22-07-04 Xi'an Shanghao housing project experience summary (01)
OpenGL - Model Loading
Huber Loss
随机推荐
[ManageEngine] how to make good use of the report function of OpManager
2310. The number of bits is the sum of integers of K
Generate confrontation network
VS Code问题:长行的长度可通过 “editor.maxTokenizationLineLength“ 进行配置
[reading notes] Figure comparative learning gnn+cl
Hosting environment API
LeetCode 31. Next spread
Vs code problem: the length of long lines can be configured through "editor.maxtokenizationlinelength"
生成对抗网络
Project practice | excel export function
Nips2021 | new SOTA for node classification beyond graphcl, gnn+ comparative learning
OpenGL - Lighting
迁移学习和域自适应
Creation and reference of applet
MYSQL 对字符串类型排序不生效问题
LeetCode 496. Next larger element I
LeetCode 556. Next bigger element III
np. allclose
Analysis of eventbus source code
【ManageEngine】如何利用好OpManager的报表功能