Export specific column and row (is it possible?)

Discussion in 'MySQL' started by dadaas, Mar 17, 2010.

  1. #1
    I need help with exporting my old database.

    Let say my table have title, content and category

    i wish to export whole table with titles and content of category number 3, so stuff from category 1 and 2 is not exportet.

    p.S. i use Lampp localhost and i can delete category 1 and 2 and then export whole table contain just category 3.

    If this is the only solution can yopu tell me what kind of SQL query i need to run? Or direct me to the command i need to use.

    Thanks alot
     
    dadaas, Mar 17, 2010 IP
  2. koko5

    koko5 Active Member

    Messages:
    394
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    #2
    CREATE TABLE MYEXPORT (SELECT * FROM TableName WHERE category=3);
    Code (markup):
    Now dump MYEXPORT
    Regards :)
     
    koko5, Mar 17, 2010 IP
    dadaas likes this.
  3. dadaas

    dadaas Well-Known Member

    Messages:
    1,298
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Thanks alot, this works.
     
    dadaas, Mar 17, 2010 IP