tags:

views:

23

answers:

1

Rather than export the entire table, that is, fname, lname, address, email, etc. how can I export JUST the email field to CSV or Excel?

+3  A: 

You can query the database and export the result.

Example: SELECT fname FROM users INTO OUTFILE '/tmp/result.csv' directly from mysql command line

or

SELECT fname FROM users and export the result of this query from your favorite mysql client

Bogdan Constantinescu
awesome.. thanks... what if i wanted to get crazy and add id>10,000 to get the most recent members or something... how can i do that? i tried the logical semantic language but got an error
adam
Just add WHERE condition. SELECT fname FROM users WHERE id > 10000 INTO OUTFILE '/tmp/result.csv'
Naktibalda