Cursor in SQL SERVER 2005

3 views
Skip to first unread message

Meet

unread,
Jan 13, 2011, 12:29:58 PM1/13/11
to DotNetProfessionals-Group
Hi, this is the simplest example of using cursor in SQL SERVER 2005.

Basically cursor is a database object which is used to manipulate data
row by row.

Example:
****************************
use tennis
go
declare @userid nvarchar(220)
declare @c1 cursor
set @c1= cursor for select uid from usertable
open @c1

fetch next from @c1 into @userid
WHILE @@FETCH_STATUS = 0
BEGIN
print @userid
fetch next from @c1 into @userid
end
close @c1
deallocate @c1
go
******************************

mayour mirza

unread,
Jan 18, 2011, 4:19:09 PM1/18/11
to dotnetprofes...@googlegroups.com
Hi There,
 
Could you please explain me how to use MVC archetecture in project.
 
regards,
Mirza

--
The first step to getting the things you want out of life is this: Decide what you want.
Ben Stein

Reply all
Reply to author
Forward
0 new messages