ORA-01476: divisor is equal to zero
0으로 나눌 수 없음
- 해당 컬럼에 밑의 수식을 작성
ROUND(NVL(column_name1/DECODE(column_name2, 0, NULL, column_name2), 0))
- 예시
SELECT * FROM ( SELECT SQL_ID, MODULE, CPU_TIME, ELAPSED_TIME, ROUND(NVL(ELAPSED_TIME/DECODE(EXECUTIONS, 0, NULL, EXECUTIONS), 0)) AS avg_elapsed, ROUND(NVL(CPU_TIME/DECODE(EXECUTIONS, 0, NULL, EXECUTIONS), 0)) AS avg_cpu, SQL_TEXT FROM V$SQL ORDER BY avg_elapsed DESC ) WHERE ROWNUM <= 100 ;