Tutorials
Resources
Forum
Communities
Interview
Jobs
Projects
Offshore Development
Silverlight Tutorials
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Abhi
(65)
Appukuttan
(40)
raj krishna
(37)
Last 7 Days
Appukuttan
(660)
Babu Akkandi
(465)
Tejinder Singh ...
(273)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
The BREAK and CONTINUE Statements in SQL Server
Posted Date: 23 Jun 2008
Resource Type:
Definitions
Category:
General
Author:
Bunty
Member Level:
Diamond
Rating:
Points
: 7
You can use the BREAK and CONTINUE statements to control the execution of the statements inside a WHILE loop. The BREAK statement causes an exit from the WHILE loop.Any statemens that appear after END keyword, that marks the end of the loop, are executed after the BREAK statement is executed.The CONTINUE statement causes the WHILE loop to restart, skipping any statements after CONTINUE inside the loop.
Example:
DECLARE @count int
SELECT @count=11
WHILE @count > 0
BEGIN
SELECT @count=@count-1
IF @count=4
BEGIN
BREAK
END
IF @count=6
BEGIN
CONTINUE
END
PRINT @count
END
OUTPUT:
10
9
8
7
5
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Value Type and Reference Type
Previous Resource:
Schema-Binding
Return to Discussion Resource Index
Post New Resource
Category:
General
Post resources and
earn money
!
Related Resources
Interfaces
What are the Similarities between Classes and Structures?
InStr function of VBA
Application Domain
Web.Config in .Net
dotNet Slackers
BizTalk Adaptors
Web Design
Contact Us
Privacy Policy
Terms Of Use