I don't know anything about SQLYog but it looks like a MySQL tool, not SQL Server (this post was tagged with T-SQL). I also don't know much about MySQL but would suggest creating a permanent numbers table with as many numbers as you need then you can use it like this:
-- say I need the numbers 1 to 10:
SELECT N
FROM tally
WHERE N BETWEEN 1 AND 10; -- these can be variables
To create one you can use this syntax (which works in T-SQL or MYSql):
CREATE TABLE tally (N int NOT NULL, PRIMARY KEY (N));
To populate it you can do so using a loop (I don't recommend loops but will make an exception here since no other syntax is working for you):
T-SQL version:
DECLARE @i int;
SET @i = 1;
-- T-SQL syntax
WHILE @i <= 1000 -- change this to the max number of rows that you want
BEGIN
INSERT dbo.tally VALUES (@i);
SET @i = @i+1;
END;
MySQL Syntax:
-- MySQL syntax
declare ii int unsigned default 1000;
declare i int unsigned default 0;
truncate table foo;
start transaction;
while i < ii do
insert into dbo.tally (N) values (i);
set i=i+1;
end while;
commit;
Note: I can't test my MySQL query since I don't have access to a MySQL box at the moment.