当前位置:网站首页>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
边栏推荐
- Priority queue (heap)
- Introduction Guide to stereo vision (6): level constraints and polar correction of fusiello method
- Understanding of smt32h7 series DMA and DMAMUX
- . Net service governance flow limiting middleware -fireflysoft RateLimit
- VS Code问题:长行的长度可通过 “editor.maxTokenizationLineLength“ 进行配置
- MYSQL 对字符串类型排序不生效问题
- LeetCode 503. 下一个更大元素 II
- 测试老鸟浅谈unittest和pytest的区别
- Applet (subcontracting)
- 太不好用了,长文章加图文,今后只写小短文
猜你喜欢
Project practice | excel export function
Understanding rotation matrix R from the perspective of base transformation
Confusion matrix
Understanding of smt32h7 series DMA and DMAMUX
fs. Path module
LeetCode 556. 下一个更大元素 III
Applet (global data sharing)
[reading notes] Figure comparative learning gnn+cl
Rebuild my 3D world [open source] [serialization-1]
LeetCode 503. Next bigger Element II
随机推荐
Node collaboration and publishing
我的一生.
Thermometer based on STM32 single chip microcomputer (with face detection)
C language - input array two-dimensional array a from the keyboard, and put 3 in a × 5. The elements in the third column of the matrix are moved to the left to the 0 column, and the element rows in ea
Huber Loss
Kotlin introductory notes (III) kotlin program logic control (if, when)
Kotlin introductory notes (II) a brief introduction to kotlin functions
OpenGL - Coordinate Systems
[ManageEngine] how to make good use of the report function of OpManager
【PyTorch Bug】RuntimeError: Boolean value of Tensor with more than one value is ambiguous
Global configuration tabbar
Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
C # draw Bezier curve with control points for lattice images and vector graphics
SMT32H7系列DMA和DMAMUX的一点理解
Kotlin introductory notes (V) classes and objects, inheritance, constructors
Kotlin introductory notes (VI) interface and function visibility modifiers
22-07-04 Xi'an Shanghao housing project experience summary (01)
【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
Android privacy sandbox developer preview 3: privacy, security and personalized experience
Rebuild my 3D world [open source] [serialization-3] [comparison between colmap and openmvg]