Forum

How to write a proc...
 
Share:
Notifications
Clear all

How to write a procedure to print numbers from 1 to 100?


Posts: 18
 VK
Topic starter
(@vinodkrsetty5895)
Active Member
Joined: 4 years ago

Can anyone help me?

I want to write a procedure to print numbers from 1 to 100. How can I achieve this? 

1 Reply
Posts: 47
Guest
(@Lavanya)
Eminent Member
Joined: 4 years ago

You can use the below query to print numbers from 1 to 100

Declare @ Start Int
Declare @ End Int

Set @Start =1
Set @End =100

While @Start<=@End

Begin

Pring @start

Set @Start = @Start+1
End

Reply

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: