insert into statments dynamically using procedure if given a populated table name & db

Database

insert into statments dynamically using procedure if given a populated table name & db

How can we generate create insert into statments dynamically using procedure if I give a populated table name and database name,  

I was trying it myself and got stuck at getting data from a given table and puttign them in local variables.. 

problem comes when you fetch those values of table which is  into variables. E.g: I am trying to do this for a table1 & database1 that has 2 columns in it. I get all those column name from dbc.columnV for given a table name and database name and can build 

Insert into database1.table1 (col1,col2) values(

Do you have any solution to this? 

Below is an example of current data table1:

col1(int)        col2(varchar)

1                        abc

2                       xyz

3                         pqr

Below is desired result:

Insert into database1.table1 (col1,col2) values(1,'abc');

Insert into database1.table1 (col1,col2) values(2,'xyz');

Insert into database1.table1 (col1,col2) values(3,'pqr');

Any help is greatly appreciated... thanks