May 4, 2005 at 11:19 am
what exactly are cursors, the actual mouse pointed in client app?
May 4, 2005 at 11:32 am
It's basically a recordset that you can open/manipulate on the server. It's also viewed as an evil by good coders/dbas because it takes much more time to execute things on a row by row basis than on a set of rows.
May 4, 2005 at 11:56 am
thanks!!!
for further clarification.
is there no relationship to a the mouse pointing device?
it is a different name for a certain kind of row by row manipulation record set?
so what is the @@FETCH CURSOR function do, return the recordset?\\
TANKs!!!
May 4, 2005 at 12:00 pm
@@FETCH_STATUS is a global variable telling you if the fetch was successfull.
This is an exemple of a cursor (that would have absolutely no use...)
DECLARE Employee_Cursor CURSOR FOR
SELECT LastName, FirstName FROM Northwind.dbo.Employees
OPEN Employee_Cursor --populate the cursor
FETCH NEXT FROM Employee_Cursor --fetch a row that you would normally enter in variables at this point
WHILE @@FETCH_STATUS = 0 --while the fetch is successfull
BEGIN
FETCH NEXT FROM Employee_Cursor --goto next record
END
CLOSE Employee_Cursor --close cursor
DEALLOCATE Employee_Cursor --release the cursors resources
May 5, 2005 at 2:44 am
The database cursor is an acronym for CURrent Set Of Records (or Rows). The mouse cursor is derived from the Latin word for "to run" (http://www.etymonline.com/index.php?l=c&p=33) and is an extension of the name for the sliding part of a slide rule or other instrument. Two words with the same spelling but completely different meanings and etymologies used in the same field - don't you just love the English language?
Scott
--
Scott
May 5, 2005 at 8:31 am
and here was me thinking a cursor was that thing that blinked at you in a word document.
Man you know some odd stuff..
May 5, 2005 at 10:01 am
It's my life's ambition to prove that everyone loves a smartarse.
--
Scott
May 5, 2005 at 10:08 am
As Scott said, a cursor is just that, too.
May 5, 2005 at 10:13 am
Ya but nobody loves me... does that mean something?
May 5, 2005 at 11:06 am
Well I got married last year, so that's one convert!
--
Scott
May 9, 2005 at 9:33 pm
It means that not everyone loves a smartarse.....
Take heart Remi - I'm sure you have the gratitude and admiration of the zillions of people you've helped this past year...who needs love when you've got that right ?!
**ASCII stupid question, get a stupid ANSI !!!**
May 10, 2005 at 6:21 am
Good point... but I guess it's more in the billions helped... I can't help to think that some of us on this Earth are not geeks .
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply