12 2019 档案

摘要:select name ,greatest(num1,num2,num3,num4) as max_num -- 最大值 ,least(num1,num2,num3,num4) as min_num -- 最小值 from ( select 'a' as name,1 as num1, 3 as num2, 2 as num3,4 as num4 ) t1 ; 阅读全文
posted @ 2019-12-19 16:39 chenzechao 阅读(783) 评论(0) 推荐(0) 编辑
摘要:列转行 SELECT flag ,substring_index(substring_index(t.context,',', b.help_topic_id + 1), ',', -1) as result FROM ( select 'aa' as flag,'1,2,3,4,5,6,7' as 阅读全文
posted @ 2019-12-17 15:21 chenzechao 阅读(1569) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示