What is the use of for clause?



What is the use of for clause?..

Answer / Dinkar Rao

The FOR clause in SQL Server is used to iterate through a set of values or a result set. It can be used with various constructs like CURSOR, WHILE loops, and ROW_NUMBER(). For example, it's used in the CURSOR statement to declare a cursor that will contain rows retrieved by a SELECT statement.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

write the query for find the top 2 highest salary in sql server

36 Answers   Cranes, Jayanti Software, Medi Assist, Rmax, TCS,


Explain features and concepts of analysis services?

1 Answers  


Can you explain what is the use of custom fields in report?

1 Answers  


when we use function instead of procedure? plz tell me the situation with ex?

3 Answers   IBM,


how to find number of columns in a table in sql server 2000 and 2005 also

16 Answers   Virtusa,


How do you troubleshoot errors in a SQL Server Agent Job?

1 Answers  


Why is normalisation important?

1 Answers  


Where are magic tables stored ? Is it in the same database where it is created ?

4 Answers  


what are batch in sql server?

2 Answers   Satyam,


What stored by the model?

1 Answers  


Can we call SP inside a query?

5 Answers   CA, CarrizalSoft Technologies, Wipro,


List out the different types of locks available in sql server?

0 Answers  


Categories