Procedure Tutorial in SQL | SQL Stored Procedure | Procedure in SQL

Поделиться
HTML-код
  • Опубликовано: 11 июл 2024
  • Visit brilliant.org/techTFQ/ to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription.
    This video is about Stored Procedure in SQL. We look at what is a procedure, what is the purpose of using a procedure in SQL, syntax for creating and executing a procedure and also we shall create simple yet realistic procedure with and without parameters. We cover the concept of SQL Procedure for the most popular RDBMS such as PostgreSQL, Oracle, Microsoft SQL Server and MySQL.
    All the scripts and dataset used in this video can be downloaded for free from my discord channel.
    Link to join my discord below:
    / discord
    My Recommended SQL Course:
    learnsql.com/?ref=thoufiqmoha...
    My Recommended platform to practice writing SQL queries:
    www.stratascratch.com/?via=te...
    My Live SQL Course on Lighthall:
    www.lighthall.co/profile/techTFQ
    Timestamp:
    00:00 Introduction to procedure tutorial
    02:12 What is a procedure
    03:07 What is the purpose of using a procedure in SQL
    04:31 Syntax to create a procedure in PostgreSQL
    09:18 Syntax to create a procedure in Oracle
    10:22 Syntax to create a procedure in Microsoft SQL Server
    13:07 Syntax to create a procedure in MySQL
    15:58 Create and execute a procedure without parameters in PostgreSQL
    26:38 Create and execute a procedure without parameters in Oracle
    30:48 Create and execute a procedure without parameters in Microsoft SQL Server
    34:54 Create and execute a procedure without parameters in MySQL
    38:41 Create and execute a procedure with parameters in PostgreSQL
    51:51 Create and execute a procedure with parameters in Oracle
    56:18 Create and execute a procedure with parameters in Microsoft SQL Server
    01:02:28 Create and execute a procedure with parameters in MySQL
    If you like my videos, do consider subscribing.
    🔴 WATCH MORE VIDEOS HERE 👇
    ✅ SQL Tutorial - Basic concepts:
    • SQL Tutorial - Basic c...
    ✅ SQL Tutorial - Intermediate concepts:
    • SQL Tutorial - Interme...
    ✅ SQL Tutorial - Advance concepts:
    • SQL Tutorial - Advance...
    ✅ Practice Solving Basic SQL Queries:
    • Practice Solving BASIC...
    ✅ Practice Solving Intermediate SQL Queries:
    • Practice Solving INTER...
    ✅ Practice Solving Complex SQL Queries:
    • Practice Solving COMPL...
    ✅ Data Analytics Career guidance:
    • Data Analytics career ...
    ✅ SQL Course, SQL Training Platform Recommendations:
    • SQL Course / Training
    ✅ Python Tutorial:
    • Python Tutorial
    THANK YOU,
    Thoufiq

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

  • @techTFQ
    @techTFQ  2 года назад +15

    Visit brilliant.org/techTFQ/ to get started learning STEM for free, and the first 200 people will get 20% off their annual premium subscription.

    • @michelchaghoury9629
      @michelchaghoury9629 2 года назад

      Great vid can you please make q tutirial on how to download and install oracle database and how to configure it with the right settings to get started and learning iracle please?

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

      Please share the link to download those dB, if I manually creating this entry from 1 after previous entry was loaded at 10.

  • @rahulv2265
    @rahulv2265 2 года назад +69

    Your are bahubali of SQL tutorials 👌👌👌

  • @PallabNath-to9oq
    @PallabNath-to9oq 8 дней назад

    This is by far the best SQL tutorials on the internet, better than a lot of paid resources

  • @TheRaju991
    @TheRaju991 Год назад +36

    Thank you very much for covering all different SQL platforms. I don't see anyone taking the effort to teach all 4 to help everyone. Much appreciated!

  • @karangupta_DE
    @karangupta_DE 2 года назад +2

    one of the best explanations of a stored procedure with an actual use case, thank you so much for the video.

  • @shivammadaan9498
    @shivammadaan9498 Год назад +7

    Thanks a lot Thoufiq, whenever I have to learn anything about SQL, your channel is the first I go through and as always you did justice to teaching it simply but elegantly. Thanks a lot my dear friend.

    • @techTFQ
      @techTFQ  Год назад

      your welcome Shivam. I am very glad to read this

  • @ryuhayabusa3540
    @ryuhayabusa3540 Год назад

    THIS MAN MAKES LEARNING EASIY, THANK YOU SO MUCH FOR ALL YOU DO FOR US. GOD BLESS YOU BROTHER;

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

    I really like speed of this tutorial, no kicking tires!
    For someone who has experience in multiple DBs need just refresh key words and style to write store procedures!!! Awesome👋👋👋 !

  • @itikalaneelu9126
    @itikalaneelu9126 Год назад

    This is the best explaination about stored procedures. Its like spoon feeding.

  • @manupriyar8169
    @manupriyar8169 2 года назад +4

    It's an awesome video.. Great effort Tafiq.. Please give more examples in real time scenario as well. Also please do videos regarding in real time scenario how we will do it like using a tool such as SSIS Or UNIX something like this..

  • @skriesten
    @skriesten 2 года назад +1

    Great explanation on this. Good reference for the future when I need it. Keep them coming. Thanks for all your videos.

    • @techTFQ
      @techTFQ  2 года назад

      Thanks Steve, will do!

  • @brendensong8000
    @brendensong8000 Год назад

    Very comprehensive tutorial! Thank you for sharing!!!

  • @sushmashreem.t1823
    @sushmashreem.t1823 2 года назад

    Superb teaching..We get more interest on Sql after seeing your videos...

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

    Just started learning SQL and I'm amazed how you explain things to look that easy. Keep it up💞🎖️🔥

  • @ShawnTheSheep407
    @ShawnTheSheep407 Год назад +1

    awesome video, as practical as an example can get!
    as compact as possible!
    thank you!

    • @techTFQ
      @techTFQ  Год назад

      Thank you so much buddy

  • @saibhargav4378
    @saibhargav4378 2 года назад +1

    Hi Tofik,
    I am impressed of your teaching. Kindly, Hoping you will do a video on functions too. It will be much useful to compare with procedures as well most of the interview pannel posting a question diff b/w procedures and functions.
    Thankyou.

  • @adarshpandey8023
    @adarshpandey8023 Год назад +1

    There are so many tutorials out there but you are damn too good.

  • @vellakibb9367
    @vellakibb9367 Год назад

    One of the best video I have ever seen. Its so simple and easy to start from. Thanks @techTFQ.

  • @prabhulakhera1430
    @prabhulakhera1430 Год назад

    Thank you techTFQ sir , your way of teaching is best

  • @odelolatechup1447
    @odelolatechup1447 2 года назад +1

    Am a big fan of your teachings.
    Keep it up sir, you are fantastic

    • @techTFQ
      @techTFQ  2 года назад

      Thanks a lot brother :)

  • @deepshah2137
    @deepshah2137 Год назад

    Excellent as always!!!

  • @bala9535
    @bala9535 2 года назад +2

    Wonderfull story telling comparing 4 diff category. Please do more vedio series.. it will help full us..

    • @techTFQ
      @techTFQ  2 года назад

      Thank you Balaji :)

  • @sudarshanmhaisdhune1039
    @sudarshanmhaisdhune1039 Год назад

    Wow man! simply outstanding.....!

  • @UpendraYadav-te8ov
    @UpendraYadav-te8ov Год назад

    Thank you so much bro for making such a wonderful video, well explained

  • @Ayesha-wf3sy
    @Ayesha-wf3sy 13 дней назад

    very well explained. I didn't bore for a while even

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

    Appreciate putting the differences.. Very helpful

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

    Best video on store procedure. Thankyou bhai for covering everything ❤.

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

      Glad it helped

  • @usamaamir2511
    @usamaamir2511 Год назад

    One of the bes ttutorial for SQL. I request you to make such kinds of tutorials for PowerBI with some projects. Love from Pakistan...

  • @ramakumarguntamadugu1299
    @ramakumarguntamadugu1299 Год назад

    thanks for sharing the great content! keep it up !

  • @SandyCoco1
    @SandyCoco1 2 года назад +1

    I'm trying to relate this with functions in Python
    Thanks for this video sir. I've not gotten to this stage yet but a pre-knowledge is not bad

    • @TheRaju991
      @TheRaju991 Год назад +1

      Though I haven't used this in a work context because in most cases Analysts will only have Read permissions, these are exactly like functions.

    • @SandyCoco1
      @SandyCoco1 Год назад

      @@TheRaju991 true
      You know in functions you don't write the codes again

  • @sukritiguin5637
    @sukritiguin5637 Год назад

    Best SQL teacher on RUclips ♥️🔥

  • @xunianzu
    @xunianzu 2 года назад +2

    This is very helpful. Thank you.

    • @techTFQ
      @techTFQ  2 года назад

      Thank you Joe :)

  • @hasanmougharbel8030
    @hasanmougharbel8030 Год назад +1

    Hey there, Great efforts in this channel.
    I have learned recently about assemblies.
    In what way, Assemblies are different from stored procedures?
    I appreciate your help at your sole convenience.
    Thanks a lot.

  • @singh9661
    @singh9661 Год назад

    Hi Tofik,
    It's an too awesome video.. Great effort Tafiq.. Please give more examples in real time scenario as well. Please please make video on Trigger and Cursor as well. God Bless You !!!!

  • @itikalaneelu9126
    @itikalaneelu9126 Год назад

    Thanks is just a small work. Keep up the good work

  • @maheshp5244
    @maheshp5244 2 года назад +2

    Thanks sir , I'm waiting for this video

    • @techTFQ
      @techTFQ  2 года назад

      I hope this helps Mahesh

  • @basavapn6487
    @basavapn6487 2 года назад +2

    Thanks for this video and could you please make the next video including collection types and cursors in Procedure

    • @techTFQ
      @techTFQ  2 года назад

      sure, will cover it as part of my PL SQL series in the future

  • @NEG0POS
    @NEG0POS 2 года назад +2

    Superb ! Keep up the good work ...

    • @techTFQ
      @techTFQ  2 года назад

      Thank you :)

  • @theskillverze
    @theskillverze Год назад +1

    Hi @techTFQ thank you for the amazing content on Procedures. It cleared lot of things in my head. I just had a request to make: Can you please do 1 or 2 videos on Triggers ? I tried searching a lot but didn't find any good videos explaining the same so hoping you could help. Thanks in advance

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

    Thoufiq excellent vedio lectures!!

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

      Thank you:)

  • @satindersingh2562
    @satindersingh2562 2 года назад +1

    Keep it up 👍. Great Efforts

    • @techTFQ
      @techTFQ  2 года назад

      Thank you :)

  • @harshshah9006
    @harshshah9006 Год назад

    Thank u so much for this !

  • @lokeshreddy7479
    @lokeshreddy7479 2 года назад +1

    Hai tofik,
    I'm great fan of your teaching. especially, the way you teach is simply awesome 👌.
    But if you could do any video on t-sql (or) pl-sql, it will be very helpful for us... 👍Thank you Tofik.

    • @techTFQ
      @techTFQ  2 года назад +1

      Thank you Lokesh :) and sure will consider it

  • @me_svr16
    @me_svr16 Год назад

    Hi Thank you for the content. Is there a way to sanitise those inputs declared in the parameter of procedure? if so can you tell me how

  • @Persianchannel1
    @Persianchannel1 Год назад

    tnx bro. outstanding video 👏

  • @Buzzingfact
    @Buzzingfact 2 года назад +2

    Thanks for the video👍

    • @techTFQ
      @techTFQ  2 года назад

      Your welcome bro

  • @yogeshmane9860
    @yogeshmane9860 Год назад

    Good work Sir, Keep it up

  • @dinesh.p8642
    @dinesh.p8642 8 месяцев назад

    Thank you TFQ ji

  • @qurdedu4032
    @qurdedu4032 2 года назад +3

    Hey Tofik thank you so much for the great materials. I was wondering, if you would create real time examples in SQL intermediate and advance lvl.

    • @techTFQ
      @techTFQ  2 года назад +1

      you mean SQL queries right?
      I have already done it and will continue to do it

  • @SatyamKumar-lj5bi
    @SatyamKumar-lj5bi 2 года назад +1

    Thanks man for the video

    • @techTFQ
      @techTFQ  2 года назад

      Your welcome Satyam

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

    I am working on Version 8.0.18 which does not support Materialized views natively. I have an issue with performance in crosstabs when I query a decently large table for unique patient ids for YTD. It takes about 3-5 mins depending on what YTD months. After Jan-Apr the query deteriorates exponentially with each passing month. So I just created an aggregated table that I run each month. But the materialized view would have been nice to use. You are a good teacher and teach at a good pace with limited filler which I really like. Thank you.

  • @hritikdalal5633
    @hritikdalal5633 25 дней назад

    Awesome presentation, explained in a crisp and clear manner, Hats off the Tutor🫡

  • @sivadurgaprasadjatla8115
    @sivadurgaprasadjatla8115 Год назад

    Hi Brother...will you please make a detail video about the difference between procedures and funtions?

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

    Brilliant work 👏

  • @user-yr5oi6ns8c
    @user-yr5oi6ns8c 10 месяцев назад

    Bahut acha kaam karta ho aap

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

    Hi Taufiq, excellent video as always ❤
    why don't you cover cursor & error handling as well ? is there any separate video for that ?

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

    awesome video, thanks, also a request, can you make more videos on PL-SQL , thanks

  • @nisha6165
    @nisha6165 2 года назад +1

    Thanks a lot for the vedio😀

    • @techTFQ
      @techTFQ  2 года назад

      Glad you liked it Nisha

  • @ratneshraj6086
    @ratneshraj6086 2 года назад +1

    Well covered but need a video using output paramaters
    Also cover user defined function and triggers

    • @techTFQ
      @techTFQ  2 года назад

      Noted bro, will do

  • @honestreview6900
    @honestreview6900 2 года назад +2

    Wish u a very happy Eid Taufiq

    • @techTFQ
      @techTFQ  2 года назад

      Thank you bro, saw this a little late :)

  • @nada-rw6iy
    @nada-rw6iy 3 месяца назад

    thank you!!

  • @Neropil
    @Neropil Год назад +1

    Amasing, thx for lessons.
    Could you explain, when and who use procedure..like even with this example, who should do it? And if it must be automatizete, how? I mean if someone but ipad, it's procedure or smth will called without you

  • @Kirankumar-ml1ro
    @Kirankumar-ml1ro Год назад

    Tq u buddy!! Will you please upload a video on pl/SQL fucntions

  • @manoganesan7618
    @manoganesan7618 2 года назад

    Could you please explain that how to send multiple parameters? Like IN condition in the WHERE Caluse.

  • @skumar05
    @skumar05 2 года назад +1

    Thanks sir to upload this video big thanks

    • @techTFQ
      @techTFQ  2 года назад +1

      I hope you like it Rahul 🙏🏼

    • @skumar05
      @skumar05 2 года назад +1

      @@techTFQ not only this video sir all your video is excellent I always watch only your video.by watching your video I am gaining sql knowledge day by day.

  • @itikalaneelu9126
    @itikalaneelu9126 Год назад

    You are a gem

  • @sibanandakhatei9634
    @sibanandakhatei9634 2 года назад +1

    Thanks for this

    • @techTFQ
      @techTFQ  2 года назад

      My pleasure bro!

  • @dgh25
    @dgh25 Год назад

    Nice!

  • @julagantivenkatavyshnavi5301
    @julagantivenkatavyshnavi5301 Год назад +1

    Hi Thoufiq, I have a doubt. When you used current_date in MySql, it worked in procedure without parameters, but it didn't work in case of procedure with parameters. Why?

  • @nayeem3905
    @nayeem3905 2 года назад

    Hello,
    Would be willing to create a video on how to troubleshoot and optimize stored procedure? Thank you

  • @Pardhu007
    @Pardhu007 2 года назад +3

    Hi bro
    These videos are very much useful
    Can you make an video for json file format and flatten the data for json format

    • @techTFQ
      @techTFQ  2 года назад +1

      Thank you :)
      and will consider it

    • @Pardhu007
      @Pardhu007 2 года назад

      Thank you

  • @JD_2
    @JD_2 Год назад

    great stuff

  • @balajir724
    @balajir724 2 года назад +1

    Hello Tofik. Please make a video for triggers as well. Thank You

  • @AsadAli-wi1xs
    @AsadAli-wi1xs 2 года назад +2

    😍😍😍😍 thanks

    • @techTFQ
      @techTFQ  2 года назад

      Your welcome Asad

  • @anupsinghrana5735
    @anupsinghrana5735 Год назад

    I have a question "You need to show joined data from 5 tables. Each table contains a large number of rows and could generate a large result set after executing the Joins. The business is not expecting live data, and a 2-hour refresh is acceptable. Performance is a top priority. What should you use?" ---- so what would be the answer and why: Stored procedure or Materialized view........kindly give your valuable guidance

  • @user-lh4no5ve3u
    @user-lh4no5ve3u 11 месяцев назад

    Hi sir, Can you Please upload how to update records from multiple tables(different tables)
    using stored procedure

  • @nammibhargav9498
    @nammibhargav9498 2 года назад +4

    I'm a fresher just finished my SQL course..I wanted to know what are the important topics will be there in real time..so I can practice more on them ..can you please suggest

    • @ShubhamSharma-ks7vd
      @ShubhamSharma-ks7vd Год назад +2

      Normalization,Joins, Stored proc, Views,Index, Groupby, Cursor, Trigger👍

  • @shubhamkapoor85
    @shubhamkapoor85 11 месяцев назад

    Is the difference between t-sql pl/sql and standard sql is the stored procedure?

  • @rohitjaiswal8116
    @rohitjaiswal8116 Год назад

    @techtfq please make videos for performing tuning of Store procedure

  • @Behappy-ft5yc
    @Behappy-ft5yc 11 месяцев назад

    hii sir, can we put a condition to check if the input quantity is not 0, since the query will update sales table for 0 as an input to the required quantity, i am still a beginner and finding it difficult as to how should i put this condition

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

    please the text editor / IDU u are using sir... or someone else, please tell..!!

  • @ManishSharma-fi2vr
    @ManishSharma-fi2vr 2 года назад +1

    Please make a tutorial on indexing....I requested you many times.

    • @techTFQ
      @techTFQ  2 года назад

      Noted Manish , but not anytime soon

  • @ka2165
    @ka2165 2 года назад +1

    Hello, what are the topics that will be covered in this video? I asked this question because recently I am looking for detailed lecture videos to understand PL/SQL, I really appreciated uploading this video at the right time when I needed the most to understand its concept.

    • @techTFQ
      @techTFQ  2 года назад

      Ive mentioned it in the video description. Check the timestamp plz

    • @ka2165
      @ka2165 2 года назад

      @@techTFQ Will do thanks a lot and also for your other great SQL lectures.

  • @rupamkarmakar2315
    @rupamkarmakar2315 2 года назад +1

    Can you make a video on functions and loops in sql please!

    • @techTFQ
      @techTFQ  2 года назад

      sure will do

  • @sanilkumarbarik9151
    @sanilkumarbarik9151 Год назад

    Are Recursive(), Procedure and statistics mandatory to get an entry level DA job?

  • @dhineshdhinesh6276
    @dhineshdhinesh6276 2 года назад +1

    Thank you so much sir will you teach json in plsql sir, thank you for your help sir learned lot international standard

    • @techTFQ
      @techTFQ  2 года назад

      Thank you Dhinesh. glad you liked it :)
      as for PLSQL concepts, I may do it in the future

    • @dhineshdhinesh6276
      @dhineshdhinesh6276 2 года назад +1

      @@techTFQ thank you for your reply sir

  • @theerapoj.disarapong
    @theerapoj.disarapong Год назад

    Dear Sit
    Where can I download your file for this learning video? I tried to do step by step but found some difficulties. Thank you.

  • @isudheermasamma
    @isudheermasamma Год назад

    Bro need alternative for collection types in postgres sql
    Can you guide me plssss

  • @LuvxJacqu4li8e
    @LuvxJacqu4li8e Год назад

    Omg another way of escaping quotes

  • @SumanKumarS
    @SumanKumarS 25 дней назад

    Hi @techTFQ I couldn't find the scripts for this Stored procedure session in the Discord..Can you pls help.

  • @manideepgubba3536
    @manideepgubba3536 Год назад

    Also Explain the stored procedures for snowflake database

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

    @techTFQ How to call a Parameter when it is table type?

  • @wSawa3689
    @wSawa3689 2 года назад +1

    First like 🎉

    • @techTFQ
      @techTFQ  2 года назад +1

      Appreciate it bro

  • @junedkhan-ge5mi
    @junedkhan-ge5mi 4 месяца назад

    when you execute select * from product how they reduce quantity ?

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

    Please share the link to download the database unable to replicate by manually creating table!!

  • @sundarrajan8306
    @sundarrajan8306 2 года назад +1

    Hlo I am working in mnc. I got a training in mssql administrator. I am going to get project also in this stream only. It have worth of learning in 2022

    • @techTFQ
      @techTFQ  2 года назад +1

      Good luck buddy

  • @nagarjunhb9739
    @nagarjunhb9739 Год назад

    What is difference between input parameter and output parameter?

  • @Gate_Tricks
    @Gate_Tricks 2 года назад +1

    hi please make a video on sql order of execution

    • @techTFQ
      @techTFQ  2 года назад

      I’ll plan it out

    • @Gate_Tricks
      @Gate_Tricks 2 года назад

      Sir i want one more topic... That is
      How to decode SQL query for competitive exam..... I have around 100 relevel question... I have good knowledge in sql but still not able to decode SQL query

  • @sagarbankar5732
    @sagarbankar5732 2 года назад

    I am looking platform where I can perform queries for proc. ,Function and triggers

  • @hustlerguy6091
    @hustlerguy6091 2 года назад +1

    where are the scripts and datasets used in this video. I cannot find them in discord

    • @techTFQ
      @techTFQ  2 года назад +1

      I’ve just attached it in “scripts_n_resources” channel of my discord. Plz check now