Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Location
    Saudi Arabia
    Posts
    9

    Question Unanswered: How to dump a set of rows?

    Hello All

    I'm wondring if I can download (dump to file) just some rows of a table, instead of downloading the whole table because the table is so huge

    Exactly, I want to do the following:
    1- dump some rows to a file
    2- insert these rows into another table located at another database

    PS. I'm using mySQL, phpMyAdmin

    Thx in Adv.

  2. #2
    Join Date
    Feb 2003
    Location
    Saudi Arabia
    Posts
    9
    an indirect solution, is to create a temp. table, and insert these rows into it using this query:

    INSERT INTO temp_table_name SELECT columns FROM table_name WHERE blah blah;

    and thin insert this table's rows into the target table, using this query:

    INSERT INTO target_table_name SELECT columns FROM temp_table_name;

    is that correct??
    and is there a direct way?

  3. #3
    Join Date
    Feb 2003
    Location
    Janesville Wi
    Posts
    1
    I am unfamiliar with the mySql and phpAdmin tools, but in sybase and microsofts implementations of transact sql the ability to select out of one table and insert into another table is not limited to just two tables in the same database. You could therefore create a temporary database select x into y where x is the table and rows you want and y is the table in a temporary database. The temorary database can then be dumped and loaded into a temorary database on your target machine. where you can reverse the process and select out of your temporary database into your production/development database. I hope this helps.

  4. #4
    Join Date
    Feb 2003
    Location
    Saudi Arabia
    Posts
    9
    Thx pal

    can u give me the SQL statements you use to implement this?
    maybe I can do it in a similar way with mySQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •