Stored Procedures in MySQL | Advanced MySQL Series

Поделиться
HTML-код
  • Опубликовано: 1 янв 2025

Комментарии • 62

  • @vanshgrover_19
    @vanshgrover_19 9 месяцев назад +21

    The best STORED PROCEDURE video I have seen on RUclips. Kudos to you ALEX.

  • @ericrullepa5683
    @ericrullepa5683 9 месяцев назад +14

    I am so thankful that I discover your chanell way back Feb 2023 Alex. Before that , I am so lost in my career not knowing my purpose in life. But bc of some random vid yt recommended to me , I become interested in D.A field and your yt channel is such a great help. You've become my role model like a father figure teaching his son to be successful . I am currently working as a customer service rep. and currently taking the Google D.A cert to increase my chance in entering in DA industry.

  • @anapslima
    @anapslima 9 месяцев назад +4

    Thank you for sharing! I don't use stored procedures because I don't want them visible to others. Usually, I just save all my queries in a GitHub repository

  • @arjunkhanal5076
    @arjunkhanal5076 Месяц назад +1

    Simple and to the point!! Thanks Alex

  • @erlanbek-kanybekov
    @erlanbek-kanybekov 9 месяцев назад +3

    Wow ❤ amazing, those stored procedures is like creating functions in Kotlin or java, python, etc.
    I’d happy if you could make a video about backup in postgresql

  • @BruceBeck-f1n
    @BruceBeck-f1n 7 месяцев назад +2

    I hate myself... I had a really TLDR comment going and managed to lose my work! Not the course's fault, I own the responsibility. Anyway, I learned some "USE" syntax from this lesson that explained a minor issue I encountered earlier tonight. Trial and Error, not the most efficient learning method, but - it's better than not learning at all! Great lesson for so many reason Alex, thanks again for your time and effort. Cheers! BB 😎

  • @radhameena4959
    @radhameena4959 8 месяцев назад +1

    This is extremely helpful. You explain things very nicely, Alex. Keep it up! :)

  • @poemnologue
    @poemnologue 4 месяца назад +2

    Owh I got it Alex, it similar to Function in another language. Really helpful for doing some job and call it when we want, GBU Alex!

  • @Neriamonde
    @Neriamonde 8 месяцев назад

    This whole series is AWESOME!!

  • @ozgunc4735
    @ozgunc4735 7 месяцев назад +1

    This was awesome and so clear. It felt so understandable. Thanks for this tutorial.

  • @favourubi5788
    @favourubi5788 3 месяца назад

    Thank you very much for putting out such great content, Alex. I'm grateful!

  • @jimwhalen6769
    @jimwhalen6769 28 дней назад

    Awesome video Huggymuffin! (No judgement here!) LOL! Thanks for your easy to understand instructions! I will be watching more!

  • @atzirimendozagtz9787
    @atzirimendozagtz9787 7 месяцев назад +6

    I have a question regarding parameters. I don't think I quite understand them well but in what scenario would they be useful? I understand why stored procedures are useful but the whole parameter thing kind of lost me.

    • @momohtimothy6898
      @momohtimothy6898 6 месяцев назад +1

      You are not the only one.

    • @sahilchauhan1455
      @sahilchauhan1455 4 месяца назад +3

      Hey Atziri, the parameters can help you with fetching details with respect to a particular input. They help us use procedures like functions in computer programming languages. Way useful if u ask me

  • @jeremynx
    @jeremynx 4 месяца назад

    Thanks a lot. Wish u good luck and a lot of followers ☺️

  • @Simulyasiya
    @Simulyasiya 6 месяцев назад +9

    The company doesn't care about Tom and Jerry when the salaries are increased but it also doesn't hesitate to see them as highly paid employees...

  • @jayantrai5807
    @jayantrai5807 Месяц назад

    That's really amazing Alex however can you please make a video on out and inout parameter as well that would help us alot as well..... Thanks

  • @Mr.Arshad-oc1fd
    @Mr.Arshad-oc1fd 6 месяцев назад

    Thanks for teaching us ❤

  • @tahiraleem
    @tahiraleem 7 месяцев назад

    6:25 This is not giving two outputs for me as only the second query in the stored procedure is running.

  • @anonymous-65732
    @anonymous-65732 9 месяцев назад +1

    AMAZING

  • @mystery-v8y
    @mystery-v8y 9 месяцев назад +1

    why should one use procedures instead of views?

  • @leesever7012
    @leesever7012 5 месяцев назад

    I wasn't able to find a way how to use the DELIMITER in MS SQL Server Management Studio. Would you be able to assist?

  • @AlexanderRodriguez-f1q
    @AlexanderRodriguez-f1q 9 месяцев назад

    Could this be applicable with date params? I have complex queries that I run often enough that this could be useful but I do have to shift the 'Where date Between yyymmdd and yyyymmdd'

  • @aishvaryasthana9089
    @aishvaryasthana9089 4 месяца назад +2

    Delimiter $$
    Create procedure Large_finalworth5 (rank int)
    Begin
    Select *
    from billionaires
    where rank= rank;
    End $$
    Delimiter;
    call Large_finalworth5 (2);
    it shows me error on line 2 and 8 , create procedure and delimeter....pls anyone suggest where i went wrong.

    • @azmary986
      @azmary986 4 месяца назад +2

      1. Change the delimiter before and after the procedure to $$.
      2. Rename the parameter from rank to rank_input to avoid conflicts.
      3. Use rank_input in the WHERE clause.
      DELIMITER $$
      CREATE PROCEDURE Large_finalworth5 (IN rank_input INT)
      BEGIN
      SELECT *
      FROM billionaires
      WHERE `rank` = rank_input;
      END $$
      DELIMITER ;
      CALL Large_finalworth5(2);

    • @aishvaryasthana9089
      @aishvaryasthana9089 4 месяца назад

      @@azmary986 thankyou very much.😀

    • @aishvaryasthana9089
      @aishvaryasthana9089 4 месяца назад

      @@azmary986 pls do also tell me while store procedure when i call any specific value lets say life_expectancy=77, it shows all data. where i went wrong here is my
      query :-
      Delimiter $$
      Create procedure life_expectancy_country (life_expectancy_country int)
      Begin
      Select *
      from billionaires
      where life_expectancy_country = life_expectancy_country;
      End $$
      Delimiter $$ ;
      call life_expectancy_country(77);

    • @aishvaryasthana9089
      @aishvaryasthana9089 4 месяца назад

      THANK U SO MUCH.​@@azmary986

    • @aishvaryasthana9089
      @aishvaryasthana9089 4 месяца назад

      @@azmary986 when i run below commond it relects all the data, but it has to only reflect the data where life_expectancy_country=77, pls help. where i went wrong.
      Delimiter $$
      Create procedure life_expectancy_country (life_expectancy_country int)
      Begin
      Select *
      from billionaires
      where life_expectancy_country = life_expectancy_country;

      End $$
      Delimiter $$ ;
      call life_expectancy_country(77);

  • @nindogaming4132
    @nindogaming4132 2 месяца назад

    How is this different from create view?

  • @magatamass
    @magatamass 9 месяцев назад

    Does that require write permissions?

  • @joanvou5867
    @joanvou5867 7 месяцев назад

    did exec turn to call? i'm revising and before i wrote it that way.

  • @altramonster6993
    @altramonster6993 6 месяцев назад

    Hi i am confuse here
    What is difference between views,store procedure both are doing the same thing...

  • @mel_mel1
    @mel_mel1 6 месяцев назад

    Thanks!

  • @AmanTiwari-ow6rc
    @AmanTiwari-ow6rc 9 месяцев назад

    excellent

  • @saivinith321
    @saivinith321 9 месяцев назад

    Pls do video on creation of views

  • @gehadabdulaziz5322
    @gehadabdulaziz5322 3 месяца назад

    thanks♥

  • @kelvinbratte3432
    @kelvinbratte3432 2 месяца назад

    MySQL is showing error when I input delimiter
    Who can help please

  • @kanikasuneja7777
    @kanikasuneja7777 5 месяцев назад +1

    @alex I didn't get any output and was able to create the stored procedure when I ran the below code...why so?
    CREATE procedure new_store_procedure3()
    Select * from
    order_details
    where order_id >= 9;
    Select * from
    order_details
    where order_id >= 5;

    • @mochi-san6384
      @mochi-san6384 Месяц назад +1

      Hey. You need to use the first execution option, not the cursor one.

  • @clarke6814
    @clarke6814 17 дней назад

  • @GbemigaAtolagbe
    @GbemigaAtolagbe 9 месяцев назад

    Hi. Do a video on uncorrelated subqueries
    i.e
    SELECT s1.article, dealer, s1.price
    FROM shop s1
    JOIN (
    SELECT article, MAX(price) AS price
    FROM shop
    GROUP BY article) AS s2
    ON s1.article = s2.article AND s1.price = s2.price
    ORDER BY article;
    T for thanks

  • @YabingLiu-z5n
    @YabingLiu-z5n 5 месяцев назад +1

    huggymuffin :D

  • @musicbox415
    @musicbox415 9 месяцев назад

    Dear Alex
    My name is Molwedi Ramoeletsi Augustinus from South Africa. You had an online bootcamp here on RUclips, I followed it and printed the certificate. Currently a hospital in my location is willing to give me work experience exposure for a Data Analyst role, they asked me to get Work Experience Certifcate Request. I'm pleading with you to assist me with writing the work experience certificate request please help me😟😟😟

  • @aidanthompson5053
    @aidanthompson5053 9 месяцев назад

    Work out the problems that God has assigned you

  • @MrgLoRybLue
    @MrgLoRybLue 3 месяца назад +1

    Anyone know when I follow Alex's example of "WHERE employee_id = employee_id" it outputs all salaries when I compute "CALL large_salariesX(1)"?

    • @abdulgafarjimoh9323
      @abdulgafarjimoh9323 3 месяца назад +1

      Exactly the same problem I am facing , all 12 rows from the employee_salary were returned whereas it just returned only one for Alex . I thought I was the only one in this ship of confusion

    • @MrgLoRybLue
      @MrgLoRybLue 3 месяца назад

      @@abdulgafarjimoh9323 I think I changed the name for one of them and that seemed to make it work. But can’t exactly recall as I am not in a PC and have not touched SQL in a while.

    • @ignisync
      @ignisync 2 месяца назад +1

      use employee_id=emp_id , giving it same varibale name leads to the issue you are having

    • @veetoria-toms
      @veetoria-toms 29 дней назад

      Hi
      I'm having same issue still ​@ignisync

    • @veetoria-toms
      @veetoria-toms 29 дней назад +1

      Hi,
      Did you figure it out?? 😢