It is my test-tab.csv as below.
\data\ hello
Notice:there is a \t between \ and h in test-tab.csv,that is to say ,showing in vim(set list).
\data\^Ihello$
Prepare for loading data.
create table tab(`f1` varchar(10),`f2` varchar(10));
Load the data into table tab.
LOAD DATA LOCAL INFILE "f:/test-tab.csv"
INTO TABLE tab
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n' \W;
And have a look.
select * from tab;
+------------+------+
| f1 | f2 |
+------------+------+
| data hello| NULL |
+------------+------+
1 row in set (0.000 sec)
How can i load data into table tab as below.
select * from tab;
+------------+------+
| f1 | f2 |
+------------+------+
| \data\ | hello|
+------------+------+
1 row in set (0.000 sec)
Constraint condition:keep the data format in test-tab.csv unchanged.