skip to Main Content

I have a MySQL database named wc_players in which it has a table called players_wc. I want to copy the entire table to another database named as fifa which already has a table named fifa_wc. How can i add this new table copying from wc_players to fifa database ?

INSERT INTO fifa.fifa_wc
SELECT * FROM wc_players.players_wc;

2

Answers


  1. If you don’t need to automatize it, you can do it easily with dbeaver.

    Connect to source and target database, right click on source table and select "export data". Choose database, select target table and select fields you want to export.

    Next, next and wait for the data to be copied.

    Here you can read all the steps with scrennshots: https://dbeaver.com/docs/dbeaver/Data-migration/

    Login or Signup to reply.
  2. You can use:

    CREATE TABLE new_table_name
    AS
    SELECT 
      * 
    FROM old_table_name;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search