Write the Syntax for Cursors.
Answer Posted / govardhana r
DECLARE @var1 varchar(20), @var2 varchar(20)
declare cursor_name cursor for
select val1,val2 from table_name
open cursor_name
fetch next from cursor_name
into @var1, @var2
while @@FETCH_STATUS = 0
begin
-----
-----
-----
fetch next from cursor_name
into @var1, @var2
end
close cursor_name
deallocate cursor_name
Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
In what three ways is the return statement used in a stored procedure?
How to insert data into an existing table?
Explain the various types of concurrency problem?
Is it true, that there is no difference between a rule and a check constraint?
What is the recursive stored procedure in sql server?
Explain differentiate between a having clause and a where clause?
what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?
What security features are available for stored procedure?
What action plan is preferred if sql server is not responding?
Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .
What is dbcc? Give few examples.
How to configure odbc dsn with different port numbers?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration
What is extended stored procedures?