SQL Case Statement/Expression with Examples | WHEN THEN ELSE in sql | SQL Tutorial in Hindi 15

Поділитися
Вставка
  • Опубліковано 2 жов 2024

КОМЕНТАРІ • 68

  • @prasadharihar6341
    @prasadharihar6341 10 місяців тому +1

    good explain thank you rishabh sir .sql kabhi sikhi nhi thi abhi kafi kuch sikh gaya apki simple tariko se kafi simple lag raha hai thank you for all🙏👌

  • @onlysuhailff
    @onlysuhailff 4 місяці тому +3

    I am also Gareeb Customer🤣😂

  • @turkeyjobsprovider
    @turkeyjobsprovider Рік тому +4

    Business Analyst Cours ka full tutorial bnay hindi me plz sir

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

    same like for loop in python

  • @Mr.tricks.
    @Mr.tricks. Місяць тому

    sir mera es baar error araha hai
    LINE 3: WHEN amount > 50 then 'expensive product'
    ^
    how to solve this error sir please reply

  • @himanshumalik1023
    @himanshumalik1023 Рік тому +5

    hello Rishabh, firstly I would like to say thank you for all the videos that you have uploaded regarding SQL, I have learned lots of things from here, my problem is I am unable to recognize which query I should use for which scenario . do you have any suggestion for that ??

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Рік тому +1

      Yes, it happens in the beginning. Solution is easy practice more sql questions

    • @shaziyasubhani448
      @shaziyasubhani448 9 місяців тому

      i have the same problem. i started learning sql 5 days ago (I'm from a non-tech background).. i think i understand the basic concepts but when i try to solve problems, i get confused about which query to use and I often don't remember the syntax so i have to look at the solution all the time.. is this common for beginners or i need to do anything else? @@RishabhMishraOfficial

  • @Khan-mc3gi
    @Khan-mc3gi Рік тому +3

    I am non i.t background i was thinking sql will be difficult for me to learn then i start watch your video u made us sql very easy and explain outstanding way to sql u are great person thanks alot sir👍👏🙌

  • @DeepakV-jf3nb
    @DeepakV-jf3nb Рік тому +1

    The kind of explanation is good ''Mehengawala'', ''Sastawala''. 😂😂

  • @arhaam_val
    @arhaam_val 2 місяці тому +1

    Thank you so much for this tutorial! 3 weeks of SQL done, started 4th week today. 🎉

  • @mahidubey633
    @mahidubey633 4 місяці тому +3

    7:09 Emotional Damage🥹🥲

  • @kaminibobade6539
    @kaminibobade6539 Рік тому +4

    You have explained it in superb way , thank you so much and please share more projects of sql

  • @himanshubhatt5562
    @himanshubhatt5562 Рік тому +1

    SO i want to ask that what is requirement of case statement if we can get values from case expression
    please tell me , i have become ur fan

  • @AkashKumar-jl3sw
    @AkashKumar-jl3sw Місяць тому

    07:09 jo bhi gareeb hai ham logo ki tarha, bhai kyu hamari le rahe ho UA-cam pe😂😂

  • @Travelling_With_Kamalu
    @Travelling_With_Kamalu Рік тому +2

    Thank you bhai - ( for the Case statement )

  • @rithikahuja8203
    @rithikahuja8203 Рік тому +3

    Greatest and easiest explanation of every topic ❤❤thank you rishabh bhaiya for this tutorial

  • @harshamannem5006
    @harshamannem5006 2 місяці тому

    Bro. I think you have confused difference between simple and searches case statements with difference of case statements and expressions. The concept you explained in this video is simple and searched case expressions

  • @balikatawale4820
    @balikatawale4820 Рік тому +1

    Ek table hai jisme ek age column hai usme query lagani hai jisse age smaller than 18 is child and age greater than 18 is adult ho

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Рік тому +2

      U have to use case statement n update the values based on conditions (age > 18 , etc)
      Sample query:
      SELECT count(*), * FROM ( select case when age_c

  • @SC-mx4wp
    @SC-mx4wp 2 місяці тому

    BHAI, 99% APNE BOLA VAISE HI HOTA HAI 🎉🎉🎉😂❤

  • @fog2640
    @fog2640 10 місяців тому +1

    finished watching

  • @guddy23k
    @guddy23k 4 місяці тому +1

    Select sabkuch was 😅fun

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

    Bhola not sab kuch it is all records...you are a real Bhola urf Tambola🤣🤣🤣

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

    Sir, how to write case statements using CTE?? please can you tell..

    • @datalover120
      @datalover120 6 місяців тому +1

      with cte
      as
      (
      select *,
      case
      when quantity =3 and quantity

    • @biswajeetdhal5364
      @biswajeetdhal5364 6 місяців тому

      @@datalover120 thanks bro..

  • @noumanibrahim8895
    @noumanibrahim8895 Рік тому +1

    Thanks for aplaod these awesome lectures but please also drop link of data set in description.

  • @iamprashantverma
    @iamprashantverma Рік тому +2

    Thank you so much sir

  • @sachinkuchgave7365
    @sachinkuchgave7365 Рік тому +1

    Can you please tell me how to wtite query when cust_id is null then cust_name should be 'not applicable'

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

      Easy,
      UPDATE table_name
      SET cust_name = 'not applicable'
      WHERE cust_id IS NULL

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

      @@RishabhMishraOfficial just want to display it in result set not in table

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

      @@RishabhMishraOfficial dont want to update in table

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

    well explained thanks for that

  • @mahendraprajapati9809
    @mahendraprajapati9809 Рік тому +1

    Very nice and informative SQL videos
    Thank you very much

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

    sir its coming as syntax error in postgre sql 15 at when statement
    query i wrote is same as yours
    SELECT customer_id,amount
    CASE
    WHEN amount > 70 THEN 'Expense Product'
    WHEN amount = 70 THEN 'Moderate Product'
    Else 'Inexpensive'
    END AS Product,
    From payment

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

      there is a comma after amount in the select statement

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

      @@piali1234 yeah i solved it beo thanks

  • @nishikantanayak7797
    @nishikantanayak7797 3 місяці тому +1

    maza agaya sir

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

    Does this "case statement" stores the data temporarily? Because after this case i used only select * from ___. that case values didnt show up. what might be the error?

    • @atulpal4986
      @atulpal4986 Рік тому +1

      If you want to store it then use update statement instead of select like update tableName set colName = Case When Amt >=500 then "Expensive product"
      End; try like this and after that use select for display it.

  • @ApurvGolatgaonkar
    @ApurvGolatgaonkar 6 місяців тому +1

    Thank you bro .. Nice teaching

  • @satyamsingh3511
    @satyamsingh3511 Рік тому +2

    Bhai odia ki?

  • @rohanbilwal6974
    @rohanbilwal6974 8 місяців тому +1

    You made SQL easy bro!

  • @deepakyenagandula8729
    @deepakyenagandula8729 Рік тому +1

    Really very good explanation bro

  • @sahilpatel1327
    @sahilpatel1327 Рік тому +1

    good work. Keep it up

  • @shivarajnavalba5042
    @shivarajnavalba5042 Рік тому +1

    Thanks bro ❤

  • @dr.nehachaudhry3526
    @dr.nehachaudhry3526 Рік тому +1

    Well explained Sir👍

  • @SagarKumar-nh3no
    @SagarKumar-nh3no Рік тому +1

    Sir, if possible, please upload the video on daily basis and complete this course..

    • @RishabhMishraOfficial
      @RishabhMishraOfficial  Рік тому +1

      Hi Sagar, this course is almost complete only one last video is left on- CTE (imp topic in sql). Then we will practice advance/complex interview problems on sql