Replacing cursors using joins in sql server Part 64
Text version of the video http://csharp-video-tutorials.blogspo... Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help. / @aarvikitchen5572 Slides http://csharp-video-tutorials.blogspo... All SQL Server Text Articles http://csharp-video-tutorials.blogspo... All SQL Server Slides http://csharp-video-tutorials.blogspo... All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenka... All Dot Net and SQL Server Tutorials in Arabic / kudvenkatarabic In Part 63, we have discussed about cursors. The example, in Part 63, took around 45 seconds on my machine. Please watch Part 63, before proceeding with this video. In this video we will re-write the example, using a join. Update tblProductSales set UnitPrice = Case When Name = 'Product - 55' Then 155 When Name = 'Product - 65' Then 165 When Name like 'Product - 100%' Then 10001 End from tblProductSales join tblProducts on tblProducts.Id = tblProductSales.ProductId Where Name = 'Product - 55' or Name = 'Product - 65' or Name like 'Product - 100%' When I executed this query, on my machine it took less than a second. Where as the same thing using a cursor took 45 seconds. Just imagine the amount of impact cursors have on performance. Cursors should be used as your last option. Most of the time cursors can be very easily replaced using joins. To check the result of the UPDATE statement, use the following query. Select Name, UnitPrice from tblProducts join tblProductSales on tblProducts.Id = tblProductSales.ProductId where (Name='Product - 55' or Name='Product - 65' or Name like 'Product - 100%')

List all tables in a sql server database using a query Part 65

Cursors in sql server Part 63
![Beginner to T-SQL [Full Course]](https://i.ytimg.com/vi/cACat4KNncg/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLA4o6xA3UzwmxwP9P-enFU9sgxi6Q)
Beginner to T-SQL [Full Course]

You NEED to STOP Using Windows 11 Right Now

I am done with Golang

Stored procedures in sql server Part 18

Clustered and nonclustered indexes in sql server Part 36

Learn SQL Beginner to Advanced in Under 4 Hours

Subqueries in sql Part 59

SQL Tutorial for Beginners

Soft Lofi Room 🎧 Chill Vibes for Peaceful Study & Relaxation

Office Jazz ☕ Elegant Spring Coffee Jazz Music & Soft Bossa Nova Instrumental for Joyful Moods

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

SQL Tutorial - Full Database Course for Beginners
![SQL Course for Beginners [Full Course]](https://i.ytimg.com/vi/7S_tz1z_5bA/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLCAEolqW9nvnTsvv0q31O_tNsNdIw)
SQL Course for Beginners [Full Course]

Frequency Of God 963 Hz ✨ Attract Miracles, Divine Blessings & Deep Inner Peace In Your Life

I turned an old van into a 2-STORY tiny house

Optional parameters in sql server stored procedures Part 68

