Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将数据加载到 mysql 中,但可用数据的格式类似于
37,85 36,41 38,21 38,44
有没有办法在导入这些数据时将逗号替换为点,否则mysql只显示
37 36 38 38
您可以将值分配给变量并在进入的过程中对其进行操作。这样的事情应该可以工作。
LOAD DATA LOCAL INFILE 'path.csv' INTO TABLE etf (@numcol) FIELDS TERMINATED BY '\n' SET mycol = REPLACE(@numcol, ',', '.')