当前位置:网站首页>Usage of (case, when) in PostgreSQL
Usage of (case, when) in PostgreSQL
2022-07-03 07:50:00 【A reserved and calm man】
1.case when
(
case
when substr(starttime::varchar,0,5)='2020' then '2020 year '
when substr(starttime::varchar,0,5)='2019' then '2019 year '
when substr(starttime::varchar,0,5)='2018' then '2018 year '
when substr(starttime::varchar,0,5)='2017' then '2017 year '
when substr(starttime::varchar,0,5)='2016' then '2016 year '
when substr(starttime::varchar,0,5)='2015' then '2015 year '
when substr(starttime::varchar,0,5)='2014' then '2014 year '
when substr(starttime::varchar,0,5)='2013' then '2013 year '
when substr(starttime::varchar,0,5)='2012' then '2012 year '
when substr(starttime::varchar,0,5)='2011' then '2011 year '
when substr(starttime::varchar,0,5)='2010' then '2010 year '
when starttime is null then ' Other years ' end
) AS year
2.mybatis To determine whether a parameter is empty
<if test="geojsonString !=null and geojsonString !=''">
WHERE
st_intersects(geom,st_geomfromgeojson(#{
geojsonString}))
</if>
边栏推荐
- 技术干货|利用昇思MindSpore复现ICCV2021 Best Paper Swin Transformer
- Technical dry goods Shengsi mindspire innovation model EPP mvsnet high-precision and efficient 3D reconstruction
- C2 several methods of merging VCF files
- Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
- Go language foundation ----- 05 ----- structure
- Pat class a 1031 Hello world for u
- Unity XR实现交互(抓取,移动旋转,传送,射击)-Pico
- Quelle est la définition? Qu'est - ce qu'une déclaration? Quelle est la différence?
- Huawei s5700 switch initialization and configuration SSH and telnet remote login methods
- [at] abc 258G - Triangle 三元組可達-暴力
猜你喜欢

Pat class a 1032 sharing

【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表

项目经验分享:基于昇思MindSpore,使用DFCNN和CTC损失函数的声学模型实现

项目经验分享:基于昇思MindSpore实现手写汉字识别

Go language foundation ----- 07 ----- method

Go language foundation ----- 10 ----- string related operations (operation function, string conversion)

PAT甲级 1028 List Sorting

Technical dry goods Shengsi mindspire lite1.5 feature release, bringing a new end-to-end AI experience

Pat class a 1030 travel plan

密西根大学张阳教授受聘中国上海交通大学客座教授(图)
随机推荐
Go language foundation ----- 06 ----- anonymous fields, fields with the same name
技术干货|昇思MindSpore Lite1.5 特性发布,带来全新端侧AI体验
Huawei switches are configured with SSH login remote management switches
Go language foundation ------17 ----- channel creation, read-write, security shutdown, multiplexing select
OSPF protocol summary
Project experience sharing: handwritten Chinese character recognition based on Shengsi mindspire
Go language foundation ----- 16 ----- goroutine, GPM model
输入三次猜一个数字
【LeetCode】2. Valid parentheses · valid parentheses
【cocos creator】获取资源uuid
[MySQL 12] MySQL 8.0.18 reinitialization
技术干货|昇思MindSpore NLP模型迁移之Roberta ——情感分析任务
項目經驗分享:實現一個昇思MindSpore 圖層 IR 融合優化 pass
密西根大学张阳教授受聘中国上海交通大学客座教授(图)
PAT甲级 1032 Sharing
PHP常用排序算法
[mindspire paper presentation] summary of training skills in AAAI long tail problem
Project experience sharing: Based on mindspore, the acoustic model is realized by using dfcnn and CTC loss function
Precautions for opensips and TLS SIP trunk docking
Differences between tp3.2 and tp5.0