I have two tables table1 and table2.
Table 1 has three columns
id name age
----------------
1 ram 27
2 rafi 30
Table 2-
no place
--------------
101 agra
102 delhi
103 chennai
104 hyd
In this situation I want to create a procedure to get the no column of table2 will be added to id column of table1 and the remaining data should be copied same and and if the count of table2 is more then the data should be repeated as shown below
id name age
-----------------
1 ram 27
2 rafi 30
101 ram 27
102 rafi 30
103 ram 27
104 rafi 30
Please help
101 ram 27and not101 rafi 30? How do you know which value to take fromtable1? - Pavel Smirnov