Mysql load data infile command format

Under Linux environment [1]

LOAD DATA INFILE /usr/LOCAL/lib/ubcsrvd/datacsv/201909_source.csv
INTO TABLE np_cdr_201909 FIELDS TERMINATED BY ',' 
IGNORE 1 LINES (product_id, calling_id, start_time, duration, call_type, @fee) 
SET original_fee = @fee * 1000, 
insert_time = SYSDATE(),
np_id = 'abdefg',
cdr_state = ' 00 ' , 
Source =  ' Kaizenly ' ;

[2] under Windows system environment

LOAD DATA INFILE 'C:/Users/Administrator/Desktop/201909/201909_source.csv' 
INTO TABLE np_cdr_201909 FIELDS TERMINATED BY ','
IGNORE 1 LINES (product_id, calling_id, start_time, duration, call_type, @fee) 
SET original_fee = @fee * 1000, 
insert_time = SYSDATE(),
np_id = 'abdefg',
cdr_state = '00',
source = 'Kaizenly ' ;

 

Good Good Study, Day Day Up.

Select the cycle order summary

Guess you like

Origin www.cnblogs.com/Braveliu/p/11446523.html