<< < 17 18 19 20 21 22   ∑:509  Sort:Rank

DYNAMIC - Creating Dynamic Cursors in SQL Server
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying table is changed after the cursor is opened, should the changes be reflected in the cursor result set? The answer is based on the update option used when creating the cursor. SQL SERVER supports two ...
2016-10-17, 5081🔥, 0💬

SCROLL - Creating Cursors for Backward Scrolling in SQL Server
How To Create a Scrollable Cursor with the SCROLL Option in SQL Server Transact-SQL? SQL Server offers two scrolling option on cursors: 1. FORWARD_ONLY - The cursor can only be scrolled forward with "FETCH NEXT" statements. In another word, you can only loop through the cursor from the first row to ...
2016-10-17, 1940🔥, 0💬

"@@FETCH_STATUS" - Looping through Result Set in SQL Server
How To Loop through the Result Set with @@FETCH_STATUS in SQL Server Transact-SQL? The FETCH statement only returns one row from the result set. If you want to return all rows, you need to put the FETCH statement in a loop. A simple way to stop the loop to check the system variable @@FETCH_STATUS, w...
2016-10-17, 1827🔥, 0💬

Declaring and Using Cursor Variables in SQL Server
How To Declare and Use Cursor Variables in SQL Server Transact-SQL? There are two ways to representing a cursor: 1. A cursor name - A static name representing a cursor object. A cursor name should be linked to a cursor object in the DECLARE statement. 2. A cursor variable name - A variable name poin...
2016-10-17, 1574🔥, 0💬

"FETCH" - Transferring Data from Cursors to Variables in SQL Server
How To Transfer Data from a Cursor to Variables with a "FETCH" Statement in SQL Server Transact-SQL? By default, a FETCH statement will display the fetched row on the client program window. If you want to transfer the output data to variables, you can specify an INTO clause with a list of variables ...
2016-10-17, 1510🔥, 0💬

<< < 17 18 19 20 21 22   ∑:509  Sort:Rank