Oracle interview question difference between null functions | NVL vs NVL2 vs NULLIF vs COALESCE
Вставка
- Опубліковано 30 чер 2018
- Difference between NVL,NVL2, NULLIF and COALESCE
NVL function will check whether the first input parameter is null, if first input parameter is null then the function returns the second parameter value as output.
NVL2 function will check the first parameter, and return second parameter if the first parameter is not null, otherwise returns third parameter.
NULLIF will compare the input parameters ( first and second parameter ), and returns NULL of both are same, otherwise returns the first parameter value.
COALESCE, returns the first not null expression in the given input parameters.
--------------------------------------------------------------------------------------------------------
List of all the SQL and PLSQL interview questions
easy-learning-tech.blogspot.c... - Наука та технологія
These 4 5 7 minutes videos are better than reading hours and hours or going through 20 mins videos
I want this type of explanation to all concepts.....thanq.....
very helpful information hatsoff sir
Complex concepts easy explanation thanks sir keep making such types of videos that helps to many students
Welcome Anil 🙂
Thank you Sir, for your great explanation of these functions.
Welcome bro
Hi siva, I have got few more questions 1. Difference between local and global index 2. Before we go for partitioning table what are the things we should analyse 3.where should I declare a procedure which should not be accessed by anyone 4. How to dynamically pass parameters to one cursor from another cursor
@Bharathi, it's difficult to explain all of this in few lines, however I try my level best to answer in upcoming video
Hi sir your explanation is very well on each and every video and thank you very much to share with all
Welcome 🙏 🙏
Great explantions sir this content helped in interviews superbbb 😊😎
My pleasure 💐💐👍🙏
Thank You!!! Amazing explanation
Thanks for your comments 🙏 🙏🙏
Please let me know how many parameters can we put in the COALESCE, GREATEST and LEAST functions ?
Hi Thank you for the so much informative videos.. I was asked a question in interview about difference between varchar and varchar2 datatype in oracle. Can you explain the difference please?
As always in detail supeerrb !!!!
My pleasure bro
explanation is awesome and the way of teaching is very good to uderstand for the beginner
Welcome bro
Very useful information.. Thanks for this video
Welcome bro
Please make partitions, cluster's and ,inline view concepts in detailed sir
Thank you so much Sir for your information
🙏🙏Welcome
Can you please make a video on regular expression and type of regular expression with small example in easy way to get it understand.
It will be very thankful, if you make video on this.
Thanks in advance cheers.
Thank you so much for good explanation video...!!
Thank you and welcome
Nice video ...very well explained
Welcome 🙏
Thanks a lot.. very informative and easy to learn..
Welcome bro
What is different between varchar2 and varchar explain
Thank you som uch for the easy explanation
Welcome
you nailed it sir thank you sir
Thank you
Nice videos.
Please include
NULLIF(NULL, NULL)
in this video.
Obviously, the result we know based on previous example but it would be nice to include that.
Sure, for subsequent videos I will add all possible scenarios 👍
Result null
It throw inconsistent datatype..thumb rule for nullif is first parameter should not be null
Best Explanation!
Thank you 💐
excellent videos thank you sir
Welcome bro
Nice understanding sir
My pleasure 💐
Hi sir, can you explain how to show nulls in all columns if I don't have queried data in a table.
Union with select null as col1, select col2 from dual
good
please make video on performance tuning
Thanks Sagar, Ya I am in process of creating PT with right examples, WIll be posting soon.
Write a query to display Salesid , SalesNo ,discount ,price of a mobile. if there is no discount for a mobile the display it as"not applicable"......use COALESCE function...!Sir can u help me with this query?
Nice explained
🙏🙏Thank you
hi sir..can you take online classes
?
can we get this as pdf ?
Jay Ho Jay Hind 🇮🇳
I need unix interview question ans production support related interview questions
1:06 - NVL
2:02 - In Case both values are NULL
2:46 - NVL 2
4:25 - NULLIF
5:52 - Coalesce
Nice
Could you please make video on DBMS_parallel_execute and DBMS_jobs procedure.
Sure, please stay tuned
What is the result of NULLIF( NULL,NULL)
since two nulls are not equal
As he said First argument should not have null. If so it throws error
select coalsce('siva',1,2,3,4,5) as result from dual; why this one is not execute , tell me the reason
Data type of all the parameters should be consistent,
try this query
select coalesce('A','1','2','3','4','5') from dual;
Thank you so much
in real time projects , where its been used.Please xplain bro
@Anandhi, "NVL", and "coalesce" functions are widely used, and most of the SQL developers would have used it day to day sql queries, however nullif and nvl2 are rarely used, depends on the functionality.
NVL - will be used when ever you want to have a default value for nulls, for eg, if the date is null, you can consider sysdate as default value.
coalesce - To get the fist not null expression in the given list of values, for eg, NVL( mobile_no1,mobile_no2, LAN_LINE_NO, fax_no,0), to get the fist not null value of given list of contact numbers.....
thnkx a lot
Welcome bro
Hi sir Please make partitions, cluster's and ,inline view concepts in detailed asap sir
Sure, please stay tuned
@@SivaAcademy tq sir
Managements wants to know the manager of each resort.
Display resortid , resort name, manager name and his phone. Sort the output in ascending order of resort id. Give alias to manager name as MANAGERNAME and phone as PHONENO.
If manager is not available then display manager name 'NA'. If phone number is not available then display as 'NA'.
Sir can I get an answer for this please
select resortid , resort_name, nvl(manager_name,'NA') as "MANAGERNAME" , nvl(phone,'NA') as "PHONENO"
from table_name
order by resortid asc
What is difference between for and forall
Sure, please stay tuned, will add new video for this
very good explanation
@Saptarishi, Thanks for your comment :-), --Siva
Pls send for and forall
I need unix interview question ans production support related interview questions