TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
While loop in SQL
Pramod Thakur
Jan 05
2015
Code
1.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
Let's declare a variable i and set the value is 10.
In second line we write a while loop.
declare
@i
int
=10
while(@i<=20)
begin
print @i
set
@i=@i+1
end
while loop in sql