当前位置:网站首页>Calculate division in Oracle - solve the error report when the divisor is zero
Calculate division in Oracle - solve the error report when the divisor is zero
2022-06-26 07:09:00 【Milk coffee 13】
One 、 Problem description
stay Oracle In the database , You need to use division , But the divisor may be zero , If used directly sql Division operator in (/), May be an error .

Two 、 Problem analysis
Through analysis, we found that , Yes, the divisor is 0 There will be problems , Then we can exclude the divisor of zero and directly specify the result as 0, And then we're doing division ( In addition, the division will result in a long number of decimal places , Need to cooperate with Round Function to intercept the corresponding reserved decimal places ).
3、 ... and 、 terms of settlement
3.1、 Syntax and examples for calculating division
--Oracle Calculation division syntax in
SELECT case WHEN(NVL( Divisor , 0))!=0 THEN round( Divisor / Divisor , Number of decimal places to be reserved ) ELSE 0 END result FROM DUAL
3.2、 Calculate the contents of the function used for division
Oracle in Case When Usage of
https://coffeemilk.blog.csdn.net/article/details/121215294
边栏推荐
- 异地北京办理居住证详细材料
- 5,10,15,20-tetra (4-bromophenyl) porphyrin (h2tppbr4) /5.2.15,10,15,20-tetra [4-[(3-aminophenyl) ethynyl] phenyl] porphyrin (tapepp) Qiyue porphyrin reagent
- Cocoscreator plays spine animation
- es 中 mapping 简介
- MATLAB线性规划模型学习笔记
- Easyar use of unity
- MySQL (III)
- The performance of iron and steel enterprises was expected to be good in January this year. Since February, the prices of products of iron and steel enterprises have increased significantly. A mighty
- Turris omnia: an open source router technology favored by hackers
- [image segmentation] blood vessel extraction from retinal fundus images based on maximum principal curvature with matlab code
猜你喜欢

MySQL basic usage 01

一项听起来大胆,并且非常牛逼的操作——复刻一个 Netflix
![[image detection] image target size measurement system based on morphology with matlab code](/img/b4/87c9b1dc3e6fdf6bd58ee7d5a8f37b.png)
[image detection] image target size measurement system based on morphology with matlab code
![[feature extraction] feature selection of target recognition information based on sparse PCA with Matlab source code](/img/79/053e185f96aab293fde54578c75276.png)
[feature extraction] feature selection of target recognition information based on sparse PCA with Matlab source code

Numpy learning challenge level 4 - numpy array attribute
![[cellular automata] Based on cellular automata, realize the traffic flow problem of expressway toll station, with matlab code](/img/6c/488be82a720635333eea90adcc388f.png)
[cellular automata] Based on cellular automata, realize the traffic flow problem of expressway toll station, with matlab code
![5,10,15,20-tetra (4-bromophenyl) porphyrin (h2tppbr4) /5.2.15,10,15,20-tetra [4-[(3-aminophenyl) ethynyl] phenyl] porphyrin (tapepp) Qiyue porphyrin reagent](/img/2b/837dfa0f80c31c2903927085c491df.jpg)
5,10,15,20-tetra (4-bromophenyl) porphyrin (h2tppbr4) /5.2.15,10,15,20-tetra [4-[(3-aminophenyl) ethynyl] phenyl] porphyrin (tapepp) Qiyue porphyrin reagent

MySQL (III)

Big factory interview TCP protocol classic 15 consecutive questions! 22 pictures to make you fully understand
![[image segmentation] blood vessel extraction from retinal fundus images based on maximum principal curvature with matlab code](/img/10/3cef095ae5834bbbe51ef16b5c9f78.png)
[image segmentation] blood vessel extraction from retinal fundus images based on maximum principal curvature with matlab code
随机推荐
Numpy learning challenge level 1 - Download and installation of numpy
[cellular automata] Based on cellular automata, realize the traffic flow problem of expressway toll station, with matlab code
网络io,磁盘io
Dark red crystal meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin (co TAPP); Meso-5,10,15,20-tetra (p-aminophenyl) cobalt porphyrin no complex (TAPP co no) supplied by Qiyue
Global and Chinese silicon carbide monocrystal furnace market survey and future production and marketing demand analysis report 2022-2027
unity之EasyAR使用
PXRD, IR, TGA of two-dimensional porphyrin COF (POR COF) /cof (2D pdpor COF) - supplied by Qiyue
5,10,15,20-tetraphenylporphyrin (TPP) and metal complexes fetpp/mntpp/cutpp/zntpp/nitpp/cotpp/pttpp/pdtpp/cdtpp supplied by Qiyue
How to choose securities companies for stock speculation? Is it safe to open a mobile account?
【推荐一款实体类转换工具 MapStruct,性能强劲,简单易上手 】
3D porphyrin MOF (mof-p5) / 3D porphyrin MOF (mof-p4) / 2D cobalt porphyrin MOF (ppf-1-co) / 2D porphyrin COF (POR COF) / supplied by Qiyue
【yolov4】基于yolov4深度学习网络目标检测MATLAB仿真
Research Report on sales scale forecast and investment opportunities of China's jewelry industry 2022-2027
一文深入底层分析Redis对象结构
. Net 20th anniversary! Microsoft sends a document to celebrate
Excel中Unicode如何转换为汉字
ES字符串类型(Text vs keyword)的选择
Item2 installation configuration and environment failure solution
When asked during the interview, can redis master-slave copy not answer? These 13 pictures let you understand thoroughly
MATLAB线性规划模型学习笔记
