Suppose I have a table as below,
ID word count
1 A 3
1 B 2
1 C 4
2 D 2
2 E 3
I want to expand the table into multiple rows based on the count column. If the count has 3 as value, then I want to create 3 rows. Similarly I want to do it for all of them. The output should be as follows,
ID word count
1 A 3
1 A 3
1 A 3
1 B 2
1 B 2
1 C 4
1 C 4
1 C 4
1 C 4
2 D 2
2 D 2
2 E 3
2 E 3
2 E 3
Can anybody help me in doing this is SQL?