Just to help you getting started, here is the sproc:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE AddTestCodeTBL
@count INT,
@num INT
AS
BEGIN
SET NOCOUNT ON;
WHILE (@count <= 155462000)
BEGIN
INSERT INTO TestCodeTBL (CodeNumbber,CodeWithSerial)
VALUES (@count, @num)
SET @count = (@count + 1 )
END
END
GO
Refer:
How To Write a Stored Procedure in SQL Server[
^]