SQL Server Cursor vs While Exists

preview_player
Показать описание
This video is just to show how SQL cursor is really not needed and that they are even slower.
I've also included a quick example of dynamic SQL query's using CTE.

TIMESTAMP
0:00 SQL cursor vs while exists
3:11 dynamic SQL query

Follow us on
Рекомендации по теме
Комментарии
Автор

actually, you don't even need a while loop and a temp table because select statement itself is already a loop and a dynamic query can do more than what a temp table does. especially when you have a very large size of data, temp table may eat too much resources, and while loop and delete statement also consume extra process time.

saifmarkov
Автор

Pretty darned handy! Nice to see Options! Well done sir!

houstonfirefox
join shbcf.ru