Home All Groups Group Topic Archive Search About

explanation needed - DECLARE CURSOR

Author
2 Dec 2005 12:40 AM
cvetic
hi!
i need (preferably 0:)) short explanation about difference between declare cursor and declare cursor *with hold*.
if i'm working in multiuser regime, and need to pay attention to locks, do i *have* to use declare with hold? -- cvetic ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------

Author
3 Dec 2005 8:17 AM
Jens
Hmm, don´t know about a switch for the WITH HOLD lock, I think you are
refering to the syntax of antoher database or you missing up something
right ? But in common you should consider using a non cursor solution,
because setbased operations are in general faster.

HTH, Jens Suessmeyer.
Author
3 Dec 2005 11:41 AM
Razvan Socol
Hi, cvetic

You posted in the wrong group. There is no "WITH HOLD" syntax in
Microsoft SQL Server. I believe it is used in IBM DB2, PostgreSQL and
some other SQL variants. An equivalent option in SQL Server is "SET
CURSOR_CLOSE_ON_COMMIT" and the "cursor close on commit" database
option.

Razvan

AddThis Social Bookmark Button