Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6249287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:12:34+00:00 2026-05-24T13:12:34+00:00

I am looking for a solutions for my MySQL data copying related problem. I

  • 0

I am looking for a solutions for my MySQL data copying related problem.
I have a table TAB1 in a database DB1 that contains some data. Now I want some of these data rows to be migrated to another table TAB2 to some another database DB2.

What would be an ideal way to write such a SQL script for MySQL server. I cannot write java/php program etc because I don’t have access to the code base.

Any example links will be helpful. I know this can be done in Oracle via DBLink but how to do it in MySQL.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:12:35+00:00Added an answer on May 24, 2026 at 1:12 pm
    insert into db2.table2 (field1,field2,..,fieldN)
    select field1,field2,..,fieldN from db1.table1
    

    EDIT. If you need to do an update between two different databases this is the right syntax:

    update 
    db2.table2 as t2,
    db1.table1 as t1
    set 
    t2.field1 = t1.field1,
    t2.field2 = t1.field2,
    t2.field3 = t1.field3
    where t1.id = t2.id
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking for some examples and solutions using the jquery-datatables-editable plugin and
I have a table in a central database that gets constantly appended to. I
Hey, I stumbled upon this site looking for solutions for event overlaps in mySQL
I've been looking for solutions that provide a couple of types of protection and
I've been looking for solutions to this problem for far too long considering how
I have been looking around for solutions, and tried to implement what is often
After looking at other questions related to sharing solutions between VS 2005 and VS
I was recently looking at some web hosting solutions and some of the providers
I am currently looking at different ORM solutions for a project that is planned
Looking for some help and advice please from Super Guru MySQL/PHP pros who can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.