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
When you should use a low fill factor?
Explain few of the new features of sql server 2008 management studio
What is sql server locking?
How to generate create view script on an existing view?
tell me what is blocking and how would you troubleshoot it? : Sql server database administration
What are the different types of locks in the database?
How many databases can we create in a single server?
How to find the second highest salary of an employee?
How to trouble shoot if unable to connect SQL Server
Mention the differences between substr and charindex in sql server.
What is sub query and its properties?
How to generate create table script on an existing table in ms sql server?
What is the sql case statement used for? Explain with an example?
What is join query?
Explain about protocol layer present in SQL server?