How does nvl function work




















The start date indicates when the record has started, and the end date indicates when the record has ended. However, we might not want to display NULL or an empty value in the system that uses this data i. So, we can use the NVL function. We first need to work out what value we want to display.

This could be a static date i. Another example of using the NVL function is where you are missing data for a column that you or the application believes should be there or if you're loading data from one table into another table and cannot use NULL values for some reason. In this table, we see information on customers. However, let's say that we use this to populate another table in another system or a materialized view and the status column cannot be NULL.

A business rule specifies that we need a value for status, but we can't update the underlying table. As you can see, the query now shows a value for the status column, even if the original value was NULL.

This now satisfies the business rule that says the status column cannot be null in your new table. Here we discuss the introduction, how NVL function work in oracle? You may also have a look at the following articles to learn more —. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy. Forgot Password? This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy.

By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy. Popular Course in this category. Course Price View Course. Free Data Science Course. Login details for this Free course will be emailed to you. Save Article. Improve Article. Like Article. Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Load Comments. What's New.



0コメント

  • 1000 / 1000