Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Monday, October 13, 2014

Sql CONTINUE STATEMENT,how to use

CONTINUE STATEMENT IN SQL DATABASE:



In this Post we learn how to use the CONTINUE statement in SQL Server with Example and also describe Example.

SQL CONTINUE STATEMENT DESCRIPTION:

In SQL Server, the CONTINUE statement is used when you are want a WHILE LOOP to execute again. It will ignore any statements after the CONTINUE statement.

SQL CONTINUE STATEMENT SYNTAX:

The syntax for the CONTINUE statement in SQL Server  is:

     CONTINUE;

Parameters or Arguments in CONTINUE STATEMENT:

  • There are no parameters or arguments for the CONTINUE statement.
  • You use the CONTINUE statement to restart a WHILE LOOP and execute the WHILE LOOP body again from the start.


SQL CONTINUE STATEMENT EXAMPLE:

See an example that represent how to use the CONTINUE statement in SQL Server
For example:

DECLARE @value INT;
SET @value = 0;
WHILE @ value <= 10
BEGIN
   IF @ value = 3
      BREAK;
   ELSE
   BEGIN
      SET @value = @value + 1;
      PRINT 'Inside WHILE LOOP’;
      CONTINUE;
   END;
END;
PRINT 'Done WHILE LOOP';
GO


In this Example of CONTINUE statement, we will restart the WHILE LOOP if the variable @value is not equal to 3.



Sql Server Related Qus:

Asp.net Related Post:


No comments:

Post a Comment