Pertama-tama tetapkan nilai yang Anda baca ke variabel, lalu kerjakan variabel itu. Untuk ini, Anda menentukan kolom tabel tujuan Anda, tetapi variabel, bukan kolom yang ingin Anda ganti.
load data local infile 'C:/filepath.../All_Data.csv'
replace into table all_data
fields terminated by ','
enclosed by '"'
escaped by '"'
lines terminated by "\r\n"
ignore 1 rows
(column_1, column_2, @variable1, @variable2, column_5)
set
Avg_Daily_Visitors = replace(@variable1,"\N",0),
pageviews = replace(@variable2,"\N", 0)
;