This is a discussion on fill column with external file list within the MySQL forums, part of the Database Server Software category; --> Hello, I have found many tutorials on how to fill a TABLE from an external file with the values ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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/...ng-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 |
| |||
| f-x.p@laposte.net wrote: > 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/...ng-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 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,...);" |