SQL Server Cursor Types - Dynamic Cursors | SQL Server Tutorial

preview_player
Показать описание
Cursors are the objects those allow us to access the data row by row from result set.

Dynamic Cursors are update-able. The dynamic cursor will fetch the changes (insert,update or delete) on each fetch while cursor is open if any modification happened to original data in table/s. This type of Cursor is helpful when we want to extract the records from original table/s while cursor is open and we are still in process of modification of data or inserting new records and want to include them in cursor result set to perform operation.

Dynamic cursors are scrollable (First,Last,Prior,Next,Relative) but absolute option does not work with dynamic Cursors.

Blog post link for the video with scripts
Рекомендации по теме
Комментарии
Автор

CAN YOU MAKE THE FETCH NEXT FROM CURSOR INTO (I DON'T KNOW HOW MANY FIELDS I AM GOING TO TAKE FROM MY QUERY, CAN IT BE ONE OR 5) CAN THIS PART BE MADE DYNAMIC?

pabloclemente