I have a table name TABLE1 in which I have a column YEAR where I an storing the year information like 1990 , 2000 ,2001 etc. I have another table TABLE2 in which I have the Year column and other columns as well.
Now I want to select each year from the TABLE1 and then insert some record into the TABLE2 like...
Year Information
1990 abc
1990 lmn
1990 xyz
2000 abc
2000 lmn
2000 xyz
How can I get this I do not know how I will use the while loop or how I will get the each row from select statement and then pass it to the insert statement.