当前位置:网站首页>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
边栏推荐
- np. allclose
- 编辑器-vi、vim的使用
- Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
- C # image difference comparison: image subtraction (pointer method, high speed)
- 3D reconstruction open source code summary [keep updated]
- Editor use of VI and VIM
- Deep understanding of C language pointer
- C语言-从键盘输入数组二维数组a,将a中3×5矩阵中第3列的元素左移到第0列,第3列以后的每列元素行依次左移,原来左边的各列依次绕到右边
- C # compare the differences between the two images
- Applet (use of NPM package)
猜你喜欢
随机推荐
What is a firewall? Explanation of basic knowledge of firewall
一篇文章带你走进cookie,session,Token的世界
信息与熵,你想知道的都在这里了
Kotlin introductory notes (I) kotlin variables and non variables
Project practice | excel export function
Newton iterative method (solving nonlinear equations)
Principle and performance analysis of lepton lossless compression
Introduction Guide to stereo vision (7): stereo matching
[team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details
Jenkins Pipeline 方法(函数)定义及调用
C # draw Bezier curve with control points for lattice images and vector graphics
Kotlin introductory notes (VII) data class and singleton class
LeetCode 556. 下一个更大元素 III
[beauty of algebra] solution method of linear equations ax=0
图神经网络+对比学习,下一步去哪?
阿里云发送短信验证码
C语言-从键盘输入数组二维数组a,将a中3×5矩阵中第3列的元素左移到第0列,第3列以后的每列元素行依次左移,原来左边的各列依次绕到右边
OpenGL - Lighting
Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
高性能Spark_transformation性能