Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: mysql dump help

  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Posts
    131
    Thanks
    5
    Thanked 0 Times in 0 Posts

    mysql dump help

    Hello,

    I want to load specific columns into a new table.

    current_table:
    recno, name, phone, active

    new_table:
    recno, address, active

    I want to load:
    select recno, active from current_table where active=1

    into the new table.

    do i use mysql dump? how do I put the query into the mysql dmp?

    thanks in advance!
    Tony
    ---------
    Client / Server Side Programmer II

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,631
    Thanks
    4
    Thanked 147 Times in 138 Posts
    don't even need that, it is as simple as:

    Code:
    INSERT INTO new_table 
    select recno, active from current_table where active=1


  •  

    Posting Permissions

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