玖夜宠妾,不信你不笑 国庆七天乐,毛羽弱先摧
1.保留小数点。保留小数点,round运算时,必须加 ::numeric
select round(b.num::numeric/b.counts::numeric,4)
2.转日期格式
to_char(t.create_time, 'yyyy')
3.选择语句
case when use_money is not null and download_count is null then -1 else round(use_money::numeric/download_count::numeric,2) end
case when use_money is not null then -1 else xx end
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
数据库SQL---数据库、基本表、视图、索引的定义、修改、删除
在 Azure CentOS VM 中配置 SQL Server 2019 AG - (上)
在 Azure CentOS VM 中配置 SQL Server 2019 AG - (下)
网友评论