SQL Stored Procedure Loop

lo5750ul

Senior member
Jul 18, 2001
744
0
76
Hey all,

I would like to do a simple counter loop in an SQL Stored Procedure. I am passing a variable in to the SP and I want to count from 1 to the variable.

Does anyone know how to do it?

Cheers.