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...
  • Наука та технологія

КОМЕНТАРІ • 83

  • @santoshadhikari9933
    @santoshadhikari9933 2 роки тому +4

    These 4 5 7 minutes videos are better than reading hours and hours or going through 20 mins videos

  • @RameshYadav-ei3kd
    @RameshYadav-ei3kd 4 роки тому +6

    I want this type of explanation to all concepts.....thanq.....

  • @martinsuresh5048
    @martinsuresh5048 6 років тому

    very helpful information hatsoff sir

  • @anilb5557
    @anilb5557 2 роки тому +3

    Complex concepts easy explanation thanks sir keep making such types of videos that helps to many students

  • @harekrushna09
    @harekrushna09 2 роки тому

    Thank you Sir, for your great explanation of these functions.

  • @bharathipandian45
    @bharathipandian45 5 років тому +4

    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

    • @SivaAcademy
      @SivaAcademy  5 років тому

      @Bharathi, it's difficult to explain all of this in few lines, however I try my level best to answer in upcoming video

  • @devanaidu9406
    @devanaidu9406 4 роки тому +2

    Hi sir your explanation is very well on each and every video and thank you very much to share with all

  • @kumarakrish3976
    @kumarakrish3976 3 роки тому

    Great explantions sir this content helped in interviews superbbb 😊😎

    • @SivaAcademy
      @SivaAcademy  3 роки тому +1

      My pleasure 💐💐👍🙏

  • @niranjandhavalikar
    @niranjandhavalikar 4 роки тому

    Thank You!!! Amazing explanation

    • @SivaAcademy
      @SivaAcademy  4 роки тому +1

      Thanks for your comments 🙏 🙏🙏

  • @4ashutosh
    @4ashutosh 4 роки тому +1

    Please let me know how many parameters can we put in the COALESCE, GREATEST and LEAST functions ?

  • @hemlathaiyer2404
    @hemlathaiyer2404 Рік тому

    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?

  • @snehalr4312
    @snehalr4312 2 роки тому

    As always in detail supeerrb !!!!

  • @i.ashokreddy8548
    @i.ashokreddy8548 2 роки тому

    explanation is awesome and the way of teaching is very good to uderstand for the beginner

  • @bharatk212
    @bharatk212 2 роки тому

    Very useful information.. Thanks for this video

  • @devanaidu9406
    @devanaidu9406 4 роки тому +5

    Please make partitions, cluster's and ,inline view concepts in detailed sir

  • @mallikarjunam3239
    @mallikarjunam3239 4 роки тому

    Thank you so much Sir for your information

  • @kalpeshpatil4321
    @kalpeshpatil4321 4 роки тому

    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.

  • @iswaryas5321
    @iswaryas5321 8 місяців тому

    Thank you so much for good explanation video...!!

  • @pritisingh8639
    @pritisingh8639 4 роки тому

    Nice video ...very well explained

  • @ragulraina1422
    @ragulraina1422 8 місяців тому

    Thanks a lot.. very informative and easy to learn..

  • @dineshkumar-vp9dm
    @dineshkumar-vp9dm 4 роки тому

    What is different between varchar2 and varchar explain

  • @sannidhirao1281
    @sannidhirao1281 2 роки тому

    Thank you som uch for the easy explanation

  • @sureshraina321
    @sureshraina321 3 роки тому

    you nailed it sir thank you sir

  • @junkingjunking8477
    @junkingjunking8477 4 роки тому +1

    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.

    • @SivaAcademy
      @SivaAcademy  4 роки тому +1

      Sure, for subsequent videos I will add all possible scenarios 👍

    • @m.s.k5300
      @m.s.k5300 4 роки тому

      Result null

    • @bmanikandan70
      @bmanikandan70 2 роки тому

      It throw inconsistent datatype..thumb rule for nullif is first parameter should not be null

  • @ashishmishra3797
    @ashishmishra3797 2 роки тому

    Best Explanation!

  • @ShaikAbdulFayazYCE
    @ShaikAbdulFayazYCE Рік тому

    excellent videos thank you sir

  • @bidhubhusanpolai3695
    @bidhubhusanpolai3695 3 роки тому

    Nice understanding sir

  • @keerthin9362
    @keerthin9362 3 роки тому

    Hi sir, can you explain how to show nulls in all columns if I don't have queried data in a table.

    • @kwkw5711
      @kwkw5711 3 роки тому

      Union with select null as col1, select col2 from dual

  • @sagarjadhav299
    @sagarjadhav299 5 років тому +1

    good
    please make video on performance tuning

    • @SivaAcademy
      @SivaAcademy  5 років тому +3

      Thanks Sagar, Ya I am in process of creating PT with right examples, WIll be posting soon.

  • @pruthvisarkar2534
    @pruthvisarkar2534 3 роки тому

    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?

  • @pavanjoshi2356
    @pavanjoshi2356 4 роки тому

    Nice explained

  • @mupparthiuma5798
    @mupparthiuma5798 3 роки тому

    hi sir..can you take online classes
    ?

  • @M_M_Vlogs
    @M_M_Vlogs 3 роки тому

    can we get this as pdf ?

  • @yuvrajb4696
    @yuvrajb4696 11 місяців тому +1

    Jay Ho Jay Hind 🇮🇳

  • @bharathipandian45
    @bharathipandian45 2 роки тому

    I need unix interview question ans production support related interview questions

  • @vivektarab16
    @vivektarab16 Місяць тому

    1:06 - NVL
    2:02 - In Case both values are NULL
    2:46 - NVL 2
    4:25 - NULLIF
    5:52 - Coalesce

  • @giridandi7480
    @giridandi7480 Рік тому

    Nice

  • @mohantadibyajyoti
    @mohantadibyajyoti 2 роки тому

    Could you please make video on DBMS_parallel_execute and DBMS_jobs procedure.

  • @BatchelorHub
    @BatchelorHub 2 роки тому

    What is the result of NULLIF( NULL,NULL)
    since two nulls are not equal

    • @naveenavnp383
      @naveenavnp383 2 роки тому

      As he said First argument should not have null. If so it throws error

  • @ravipatisrikanth8331
    @ravipatisrikanth8331 3 роки тому

    select coalsce('siva',1,2,3,4,5) as result from dual; why this one is not execute , tell me the reason

    • @SivaAcademy
      @SivaAcademy  3 роки тому

      Data type of all the parameters should be consistent,
      try this query
      select coalesce('A','1','2','3','4','5') from dual;

    • @ravipatisrikanth8331
      @ravipatisrikanth8331 3 роки тому

      Thank you so much

  • @anandhineema8278
    @anandhineema8278 5 років тому

    in real time projects , where its been used.Please xplain bro

    • @SivaAcademy
      @SivaAcademy  5 років тому +3

      @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.....

  • @vishnumishra2219
    @vishnumishra2219 2 роки тому

    thnkx a lot

  • @devanaidu9406
    @devanaidu9406 4 роки тому

    Hi sir Please make partitions, cluster's and ,inline view concepts in detailed asap sir

  • @manjushreesb7580
    @manjushreesb7580 4 роки тому +1

    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

    • @SivaAcademy
      @SivaAcademy  4 роки тому +3

      select resortid , resort_name, nvl(manager_name,'NA') as "MANAGERNAME" , nvl(phone,'NA') as "PHONENO"
      from table_name
      order by resortid asc

  • @udayreddybarri6642
    @udayreddybarri6642 4 роки тому

    What is difference between for and forall

    • @SivaAcademy
      @SivaAcademy  4 роки тому

      Sure, please stay tuned, will add new video for this

  • @saptarshikonar3149
    @saptarshikonar3149 5 років тому +1

    very good explanation

    • @SivaAcademy
      @SivaAcademy  5 років тому

      @Saptarishi, Thanks for your comment :-), --Siva

  • @udayreddybarri6642
    @udayreddybarri6642 4 роки тому

    Pls send for and forall

  • @bharathipandian45
    @bharathipandian45 2 роки тому

    I need unix interview question ans production support related interview questions