Let's say you need a table that has numbers from 1 to 10.

view plain print about
1declare @i integer
2set @i=0
3while (@i<10)
4 begin
5    insert into digits (digit) values (@i)
6    set @i=@i+1
7 end
8
9select * from digits

view plain print about
1digit
2------
30
41
52
63
74
85
96
107
118
129
13
14(10 row(s) affected)

Lets say you wanted all the letters in a table. Checking www.asciitable.com, we see that A has the ASCII value of 65, and Z has the ASCII value of 90.

view plain print about
1declare @i integer
2set @i=65
3while (@i<=90)
4 begin
5    insert into letters (letter) values (CHaR(@i))
6    set @i=@i+1
7 end
8
9select * from letters

view plain print about
1letter
2------
3A
4B
5C
6D
7E
8F
9G
10H
11I
12J
13K
14L
15M
16N
17O
18P
19Q
20R
21S
22T
23U
24V
25W
26X
27Y
28Z
29
30(26 row(s) affected)