Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:mysql:loading_csv_files [2007/10/14 00:15] – billh | docs:mysql:loading_csv_files [2008/08/03 00:25] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 39: | Line 39: | ||
" | " | ||
</ | </ | ||
+ | |||
+ | ===== set ===== | ||
+ | User variables in the SET clause can be used in several ways. The following example uses the first input column directly for the value of t1.column1, and assigns the second input column to a user variable that is subjected to a division operation before being used for the value of t1.column2: | ||
+ | < | ||
+ | LOAD DATA INFILE ' | ||
+ | INTO TABLE t1 | ||
+ | (column1, @var1) | ||
+ | SET column2 = @var1/100; | ||
+ | </ | ||
+ | |||
+ | ===== External Links ===== | ||
+ | * http:// | ||