Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

fill column with external file list

0 views
Skip to first unread message

f-...@laposte.net

unread,
May 10, 2007, 2:48:25 PM5/10/07
to
Hello,

I have found many tutorials on how to fill a TABLE from an external
file with the values (not sql, just one value per line see for this:
http://www.mysql.org/doc/refman/5.1/en/loading-tables.html ).

My question is: can I fill **just one COLUMN** from a table, with such
a file?

Thank you for any hint.

François

Paul Lautman

unread,
May 10, 2007, 2:57:05 PM5/10/07
to

Yes, see the page
http://www.mysql.org/doc/refman/5.1/en/load-data.html
in the same manual.

Particularly this paragraph:
"By default, when no column list is provided at the end of the LOAD DATA
INFILE statement, input lines are expected to contain a field for each table
column. If you want to load only some of a table's columns, specify a column
list:
LOAD DATA INFILE 'persondata.txt' INTO TABLE persondata (col1,col2,...);"


f-...@laposte.net

unread,
May 12, 2007, 5:29:07 AM5/12/07
to
Really Thank you Paul,

this is exactly what I was looking for. Sorry I didn't read the
complete manual carefully enough.

Thanks again

François

0 new messages