Null Values in Oracle

NULL in Oracle means empty. You need really a special mechanism to handle NULL values in Oracle

Oracle supoorts the NVL function to handle NULL values.

NULL means empty, so it is neither zero nor spaces. NULL value takes place, when the user does not enter any data in the respective columns.

So, if you encounter a null value, ensure that you have taken enough precautions well in advance, failing which you can land up with invisible result as any operation with the NULL value results NULL only.

Like for numbers, you can handle NVL(comm,0) – which means, if the comm column is NULL, then convert it to zero for computation purpose

Ensure that the column attribute is not set to NOT NULL. A Primary Key, by default can NEVER accept any NULL Value.

Leave a Reply