select NVL(B.SEQID, A.LVL5_ID) LVL6_ID, NVL(B.NAME, ' ') LVL6_NAME, A.LVL5_ID
FROM LVL5 A, ABC B WHERE A.LVL5_ID = B.LVL7
The above query is what defines the view in my system. Here I would like to know why NVL was used.
The fact is that the SEQID is a primary key column and cannot be null. Is NVL needed here?
B.SEQID can be null if no records matching the where clause can be found (I know this doesn't make sense, but I just had to ask)
source
share