I need to copy only some selected rows from a table and insert these rows into another table (having the same structure) in another database. Is it possible?

Recommended Answers

All 3 Replies

Do something like:

INSERT INTO table1 (col1, col2, col3) SELECT col1, col2, col3 FROM table2 WHERE col4='some value'

Thanks a lot friend..

Insert into table2 (column_name1, column_name2) select column_name1, column_name2 from table1 where column_name1='value'

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.