What is the difference between decode and case

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

ความคิดเห็น • 98

  • @sampathkumar8392
    @sampathkumar8392 4 ปีที่แล้ว +27

    Today I have faced interview and they have asked this question as well... Luckily I saw this video, before interview and immediately I have answered...Thanks A Lot dear for posting such a useful video... YOU WILL BE THERE IN EVERY CANDIDATE'S SMILE, WHEN THEY GET OFFER....

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว +5

      Its my pleasure 😊, best wishes bro 💐💐💐

  • @vivektarab16
    @vivektarab16 6 หลายเดือนก่อน

    Start
    0:09 - Decode and Case
    0:45 - Understand Using Examples
    2:00 - Same Thing Using Case Statement
    2:45 - To Print Pass or Fail
    4:01 - Exactly Same Functionality from Case statement
    5:38 - Let us see with one more example
    6:40 - Few more differences now
    8:26 - Few More Example
    9:25 - One more difference

  • @ramus6188
    @ramus6188 ปีที่แล้ว

    Simply superb

  • @manjunathreddy3484
    @manjunathreddy3484 5 ปีที่แล้ว +2

    Hi sir,
    Thanks for uploading videos!
    could please help me on 1)How pipeline function will work
    2)How to make the non partitioned table into to partitioned
    3)How select * from emp (How internally worked (Capgemini asking))
    4)Performance tunning related real time eg we want
    5) Different pragmas in oracle
    6) can we create index on view
    7)can we create index on Materialized view
    8)Can we create trigger insdide the procedure or can we create the procedure inside the trigger
    9)How to calculate age of the person

  • @rkchannel1185
    @rkchannel1185 3 ปีที่แล้ว +1

    Please make few videos on debugging ora errors by making anonymous block

  • @srikanthgandhi7289
    @srikanthgandhi7289 5 ปีที่แล้ว +1

    Nice Explanation

  • @rajt5218
    @rajt5218 3 ปีที่แล้ว

    Excellent sir

  • @aakashdubey9653
    @aakashdubey9653 5 ปีที่แล้ว

    REALLY VERY NICE VIDEO, THANKS A LOT FOR EXPLANATION DEAR

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Aakash, thanks for your comments bro 🙏

  • @mkr7345
    @mkr7345 4 ปีที่แล้ว

    Awesome explanation ... 👍

  • @sagarjadhav299
    @sagarjadhav299 5 ปีที่แล้ว

    Good information Provided

  • @m.s.k5300
    @m.s.k5300 ปีที่แล้ว

    Do we have any limit for decofe

  • @shilpapatil7455
    @shilpapatil7455 4 ปีที่แล้ว

    Which one is good in performance?

  • @seetamajhi9934
    @seetamajhi9934 4 ปีที่แล้ว +1

    Loved all your tutorial videos and the in-depth knowledge you shared.. hope you share some videos on hints.. thanks 🙏

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว

      My pleasure, thank you 🙏, please stay tuned 👍

  • @ppothuri
    @ppothuri 4 ปีที่แล้ว

    Awesome explanation.. thanks 🙏

  • @tusharsonwane8468
    @tusharsonwane8468 2 ปีที่แล้ว

    Thank you sir.. explain very nicely 🙏

  • @dineshkumar-vp9dm
    @dineshkumar-vp9dm 5 ปีที่แล้ว +1

    Pls explain the procedure in pragma autonomous transaction in plsql

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Dinesh, will be posting soon on autonomous transaction, please stay tuned

  • @dhanarajurevu7379
    @dhanarajurevu7379 8 หลายเดือนก่อน

    How we can define parenthesis for each statement I have lot of confusion in defining parenthesis I.e,(commas,double quotes,colons,square brackets etc)

  • @deepaksemur2243
    @deepaksemur2243 2 ปีที่แล้ว

    Sir really ur videos very useful for the interviews..keep do well...we are all supporting u

    • @SivaAcademy
      @SivaAcademy  2 ปีที่แล้ว

      Thank you very much bro

  • @shreshlove
    @shreshlove 2 ปีที่แล้ว

    Hi Sir
    Can we use both (case ,decode ) in where clause

  • @manojkumarrajaka5204
    @manojkumarrajaka5204 3 ปีที่แล้ว

    excellent bro...tq and love you

    • @SivaAcademy
      @SivaAcademy  3 ปีที่แล้ว

      Welcome bro 💐💐💐

  • @ravivarma5094
    @ravivarma5094 ปีที่แล้ว

    Could u pls make a video on clustered index and non clustured index if already exity pls share link

  • @AmritaSingh-of1du
    @AmritaSingh-of1du 7 หลายเดือนก่อน

    Thankuuu so much sir...u r doing great thing :)

  • @Ganeshay-09
    @Ganeshay-09 2 ปีที่แล้ว

    what about sql psql online classes plan shiva sir ..

    • @SivaAcademy
      @SivaAcademy  2 ปีที่แล้ว +1

      sure bro, pls stay tuned

  • @vamshiellandula5263
    @vamshiellandula5263 3 ปีที่แล้ว

    thq sir nice explaination

    • @SivaAcademy
      @SivaAcademy  3 ปีที่แล้ว

      Welcome bro 💐🙏

  • @juno7893
    @juno7893 5 ปีที่แล้ว

    Very nice. Thank you

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      It's my pleasure. Thanks for your comment :-)

  • @ravivarma5094
    @ravivarma5094 ปีที่แล้ว

    Hi Sir, could u pls make a video on dirty read problem and their solution

  • @kdeepika6482
    @kdeepika6482 4 ปีที่แล้ว

    Hi sir your fantastic tq somuch for ur effort #deepika

  • @pavankumar-yv3gp
    @pavankumar-yv3gp 3 ปีที่แล้ว

    Hi sir, when you use case in plsql in the declare section for variable you assigned value 'P' only but in the execution asking when 'F' then fail..... how it will work please explain

  • @sujaa1000
    @sujaa1000 4 ปีที่แล้ว

    Awesome, thank you again Siva, your videos are the best!
    Regards,
    Sujaa

  • @prakashshinde2177
    @prakashshinde2177 5 ปีที่แล้ว

    Very good explanation.
    I never got such examples.
    Keep it up bro

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Prakash, Thanks for your comment bro.

  • @twinklesahoo4098
    @twinklesahoo4098 5 ปีที่แล้ว

    why decode works with select statement in plsql procedure? any specific reason. how does it work internally?

  • @vivekpampattiwar5193
    @vivekpampattiwar5193 3 ปีที่แล้ว

    can we call procedure through decode function in oracle?-- can u please create a video on it or reply in comment

  • @Ammumin163
    @Ammumin163 2 ปีที่แล้ว

    Hi,
    Can you please post the local index and global index

    • @SivaAcademy
      @SivaAcademy  2 ปีที่แล้ว

      Sure, please stay tuned

  • @AliBaba-mx8of
    @AliBaba-mx8of 3 ปีที่แล้ว

    Sir, thanks for the video.its helps alot..
    Please post the query how to update 3 rows at one time with using decode and case clause.

  • @gopalg7047
    @gopalg7047 3 ปีที่แล้ว

    I really like your explanation...I should have viewd your videos in past which would be have been helpful to learn....I was expecting you to say how decode perform with order by clause in this video

  • @sateeshbabu5792
    @sateeshbabu5792 4 ปีที่แล้ว

    Super sir

  • @bharathipandian45
    @bharathipandian45 5 ปีที่แล้ว

    Can't we use user definedfunction decode

  • @faezehseyri593
    @faezehseyri593 4 ปีที่แล้ว

    fantastic job!

  • @sathiskumar7416
    @sathiskumar7416 5 ปีที่แล้ว

    I need a queries for continuously two columns to change the data using dual

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Sharon, can you please elaborate your question with sample data and expected output

    • @sathiskumar7416
      @sathiskumar7416 5 ปีที่แล้ว

      @@SivaAcademy questions is column name payment status as values is 'sent' another one 'failed' and another column name is payment mode as 'web' and 'ivr' ...I want payment status sent then web and failed status then Ivr and again continuously payment mode web then D and ivr then I .....if you possible to get the records?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      Can you please post sample data and expected output you are looking for

    • @sathiskumar7416
      @sathiskumar7416 5 ปีที่แล้ว

      @@SivaAcademy can you please give me your number and then I will contact you

  • @rupadevarala9000
    @rupadevarala9000 5 ปีที่แล้ว +1

    Hi Sir Thank you for uploading useful videos like these
    Sir Can you please help to answer the below question...
    1.How to debug the code??

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว +2

      @Rupa, Sure, WIll post a seperate video on how to debug the code...Please stay tuned.
      Thanks for your comment....Siva

  • @12ravindrareddy
    @12ravindrareddy 4 ปีที่แล้ว

    Hi Sir, How to display Male and female values one by one row in a table, need 10 rows like this, please advice with query

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว

      Hi, can you please paste the souce table sample data and expected output format

    • @12ravindrareddy
      @12ravindrareddy 4 ปีที่แล้ว

      Output is below
      F
      M
      F
      M
      F
      M
      F
      M
      F
      M
      F
      M

    • @kartikjuneja7807
      @kartikjuneja7807 2 ปีที่แล้ว

      select case employees
      when 'male' then 'M'
      when 'female' then 'f'
      else null
      end as result
      from employees

  • @shubhamsoni5883
    @shubhamsoni5883 4 ปีที่แล้ว

    Can decode work with other datatype then String ?

  • @sbalajion
    @sbalajion 5 ปีที่แล้ว

    Can you discuss about the performance of the above functions?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Balaji, sure, will post performance in some other video, please stay tuned.

  • @sudhansupanda4891
    @sudhansupanda4891 4 ปีที่แล้ว

    Can you please make video on Oracle server architecture with some best example

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว

      yeah, Please stay tuned.

  • @jsocial25
    @jsocial25 5 ปีที่แล้ว

    Case & decode are like switch statement in java/c. Case allow expression evaluation

  • @gauravgiri5595
    @gauravgiri5595 3 ปีที่แล้ว

    Hi Siva,
    Can you answer the below sql scenario based question.
    Write a SQL for below scenario -
    Table named Departures contains departure airport codes and Table named Arrival contains arrival airport codes.A person is travelling from airport A (&&dep) to airport B (&&arr),IF both the airport codes A and B are in Departures table, query should return D-DIF both the airport codes A and B are in Arrivals table, query should return A-AIF A is in Departures and B is in Arrivals table, query should return D-AIF B is in Departures and A is in Arrivals table, query should return A-D

    • @SivaAcademy
      @SivaAcademy  3 ปีที่แล้ว

      Can you please put a sample data and expected output In excel format and send to my mail siva.k.academy@gmail.com, will post back once I am clear on requirement and expected output

  • @unmesh25
    @unmesh25 4 ปีที่แล้ว

    Decode can not be used in WHERE clause, while CASE can be, correct me if wrong.

  • @abhisheknegi8053
    @abhisheknegi8053 4 ปีที่แล้ว

    Please make a video on joining methods like hash join ,nested loop and merge join although there are so many videos on you tube but there is no sense and hard to understand

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว

      Sure, please stay tuned, will cover in upcoming videos

  • @karkiashwin1174
    @karkiashwin1174 5 ปีที่แล้ว

    Hello sir can u make some videos realted to plsql scheduling jobs and whats the neecessity of its in real practical life?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      Sure please stay tuned

  • @venugopal5547
    @venugopal5547 5 ปีที่แล้ว +1

    null=null is true when use decode function and it is false when use case statement

  • @VishalShinde-kn8mi
    @VishalShinde-kn8mi 4 ปีที่แล้ว +1

    Hi sir.
    Fantastic video.
    Thank you .
    1) How to find current week number?

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว

      To_char(sysdate,'w') , this returns the week of month, for more details, you can look into th-cam.com/video/E0NKvwuJu5c/w-d-xo.html

  • @debayanpanigrahi6955
    @debayanpanigrahi6955 5 ปีที่แล้ว

    decode can use in DML statement .

  • @Cheema1111
    @Cheema1111 3 ปีที่แล้ว

    Hi Siva, today in the interview they asked me that what if they dont want to use any of them,any substitute for case/decode?

  • @exploringeconomics8221
    @exploringeconomics8221 10 หลายเดือนก่อน

    if else, case bit more advance