How to skip remaining statements in a loop block using continue statements?



How to skip remaining statements in a loop block using continue statements?..

Answer / Nalinaksh Punj Gautam

In MS SQL Server, you can use the CONTINUE statement within loops (WHILE, FOR, etc.) to exit the current iteration and move on to the next one.nnExample:nWHILE conditionnBEGINn -- coden IF condition_to_skip_iteration THENn CONTINUE;n -- more codenEND

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Can an entity have two primary keys?

1 Answers  


You are designing a database for your human resources department in the employee table, there is a field for social security number, which cannot contain null values if no value is given, you want a value of unknown to be inserted in this field what is the best approach?

1 Answers  


what is Full Text Search ?

1 Answers   TCS,


How many non clustered indexes there can be on table ?

1 Answers  


What are the different types of stored procedures?

1 Answers  


Does table partitioning improve performance?

1 Answers  


What is raid? : SQL Server Architecture

1 Answers  


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

1 Answers   United Healthcare,


What is default constraint in ms sql server?

1 Answers  


Define tool Manage Statistics in SQL Server 2000 query ?

1 Answers   NA,


What is an entity-relationship diagram (erd)?

1 Answers  


How to know whether our backup is succesfully taken?

1 Answers  


Categories