Here is my problem: I have a stored procedure in SQL Server 2012 which should do the following thing.
I will pass an input parameter @Range
, and the stored procedure should insert values into a table starting from 0 to @Range-1
.
CREATE PROC MyExample
(@Range INT)
AS
BEGIN
// Suppose the value of @Range is 100
// So I should do INSERT into MyTable Values(0,1,2,3,4,5,6,......99)
END
Any idea how to achieve this?