Multi statement table valued functions in sql server Part 32

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ • 44

  • @masgharlatif
    @masgharlatif 8 років тому +9

    Excellent . Kudvenkat is a really nice human , He is my best technical teacher ever . Slam to you man :)

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  12 років тому +17

    In general from a performance perspective always, prefer Inline Table Valued function(ITVF) over Multi-Statement table valued function(MSTVF), as the ITVF will perform better than the MSTVF. This is because, SQL Server treats ILTVF much like a view, hence it has the capability of using the table statistics, where as, this is not the case with MSTVF.

  • @BR-ec9zd
    @BR-ec9zd 2 роки тому +3

    Here in 2022. Very good few videos on UDFs. Been studying for a job interview and walked away feeling like I have a pretty clear understanding of this SQL. Thank you for your work and making an advanced topic understandable to many.

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  12 років тому +9

    An Inline Table Valued function(ITVF) body contains just a single TSQL statement, where as Multi-Statement table valued function (MSTVF) can contain multiple TSQL statements. So, if the table that is being returned by the function, requires several intermediate processing steps and if cannot be achieved with ITVF, then we prefer MSTVF.

  • @jasonleelawlight
    @jasonleelawlight 11 років тому

    This is exactly what I am looking for because in the video all the differences mentioned are actually the advantages of ITVF. So I believe someone must have got the same question in the mind and chances are you have given the answer already. So I looked through the posted comments and have found it here. Thanks again.

  • @Devi_Shylu
    @Devi_Shylu 2 роки тому +1

    Each video about SQL is very clear and so informative. I felt very useful of this. Thank you.🤩🤩

  • @anuragvashishtha6660
    @anuragvashishtha6660 12 років тому

    Great compilation. There is in-depth explanation of the Concepts.
    Thanks a ton Venkat!

  • @krzysztofs8535
    @krzysztofs8535 8 років тому +3

    What can I see? Perfect as always! I hope to end this whole SQL course !

  • @liltip1104
    @liltip1104 6 років тому +1

    2018 and still , your videos are amazing !!

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  12 років тому +1

    Hi Suman,
    Returns @Table table (Id int, Name nvarchar(20), DOB Date)
    The first RETURNS statement, just specifies that, the function is returning a table with the specified structure
    The RETURN statement in the body of the function, signalls that, all the processing is done, and the Table specified in in first RETURNS statement can now be returned to the caller of the function

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

    Clear and Very helpful 👍

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

    In 2023 your videos are most valuable videos

  • @justinli19901027
    @justinli19901027 8 років тому +12

    this man is god!

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  8 років тому +5

      Thank you very much for taking time to give feedback. This means a lot. I am very glad you found the videos useful.
      I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
      ua-cam.com/users/kudvenkatplaylists?view=1&sort=dd
      If you need DVDs or to download all the videos for offline viewing please visit
      www.pragimtech.com/kudvenkat_dvd.aspx
      Slides and Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel.
      ua-cam.com/video/y780MwhY70s/v-deo.html
      If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
      ua-cam.com/users/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video.
      May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
      Good Luck
      Venkat

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

    Thank you for the session

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

    Good video about in line and multi value function.

  • @kaushikbhadani
    @kaushikbhadani 11 років тому

    extremely very very good

  • @RavikiranS
    @RavikiranS 8 років тому +1

    Hi. I just ran a Store Proc and View created on the same table. However, for me the performance of the Store Procedure was slightly better than that of the View. Now how would you explain that?

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

    Kudos!

  • @makmashuk
    @makmashuk 7 років тому

    aha TNX A LOT BRO .. FOR YOUR TIME

  • @sumanhappy
    @sumanhappy 12 років тому +1

    hi venkat, can u please tell me why are you using two return statements in multi statement table valued functions, the return statement returns the @table but which return statement does that

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

    Wonderful video. Thanks a lot for such in depth explanation. Can you please tell me if underlying tables are updated, will that modify the inline table valued function immediately or we have to do any additional steps so that function comes in sync with the underlying table?

  • @aamirjamal6833
    @aamirjamal6833 7 років тому +5

    Is this the only video in which you haven't said "have a good day" at the end of your video?? :P

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

    Great

  • @gultekinhesenova4582
    @gultekinhesenova4582 11 років тому

    Hi. Thank you for these videos... But I didn't understand this video I didn't know that if Inline Table Valued function(ITVF) and Multi-Statement table valued function(MSTVF) retrieve same table then why do we always use ITVF?

  • @kiranpedamkar
    @kiranpedamkar 12 років тому

    sir, you have not uploaded videos on nested or inner/outer query on sql server.

  • @stutitehri993
    @stutitehri993 10 років тому

    which is more useful mstv function or itvf function

  • @amitvarma295
    @amitvarma295 11 років тому

    sir...can you explain, in which situation we use the MSTV function...?

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

    Sir one thing I can't understand that if we get all the benefits from Inline table valued function then why should we use Multi statement table valued function..just for the security reason?

  • @gultekinhesenova4582
    @gultekinhesenova4582 11 років тому

    I understand that in MSTVF doesn't use update statement but retieve same tabel

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

    Can we use joins in ILTVF and MLTVF.

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

    Thanks a lot for your nice video. How can you selectively call data from the MSTV function you created? (I mean, you can call data as 'Select *from [MSTVF_Name]()'. But, I want to call lists based on input parameters, let say only Gender = Female and Department = HR?

  • @MuhammadSaaddev
    @MuhammadSaaddev 6 років тому +1

    Ok, everything was going smoothly until I saw Functions performing DML Operations (insert,update,delete). We all know the basic difference between stored procedure and functions is Stored Procedures can perform DML operations while functions can not. How come inline functions are able to perform insert, update etc ??

  • @adityasamanta8621
    @adityasamanta8621 10 років тому

    I noticed that when we update the inline table value function, the original table also gets updated. Is there anyway to update the inline table but not the original table

  • @DanielWillen
    @DanielWillen 8 років тому

    What would be the difference between a multi-statement table valued function and a view with schemabinding? They look the same to me! (except that I wouldn't be able to parameterize )

  • @mokarem75
    @mokarem75 10 років тому

    What are the advantages using Inline Table Valued Functions over Views?

  • @manikdhingra1606
    @manikdhingra1606 7 років тому

    Thanks for the video, I would like to request if you can demonstrate a scenario where Inline function cannot be used and only multi value should be used OR vice versa.
    Thanks in advance!

  • @kiranpedamkar
    @kiranpedamkar 12 років тому

    and also, does not completed remaining indexes. please cover that much also...

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

    getting error as invalid column name while updating table using inline function.Same is getting updated using normal query.. What can be the real cause

  • @georgigeorgiev4871
    @georgigeorgiev4871 8 років тому

    Why would amybody use multiline if it's slower and rigid? Security maybe?

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

    Can we insert two tables at a time
    I mean
    Insert into @table
    Select I'd,name,dob from tblEmployee
    select deptid, deptname from Department
    By passing additional required parameters

  • @prafulrane9037
    @prafulrane9037 7 днів тому

    anyone in 2025?