如何在两个或多个列中以CSV格式导出并按照从左到右的排序进行排序?不在第一行之下,如下所示:
SELECT Station, Datee, Valuee
FROM ddtemperatura
WHERE (Station='14542' OR Station='14668') AND Datee BETWEEN '2008-01-01' AND '2008-01-31'
INTO OUTFILE 'C:\\Output\\Srednja6.csv'
FIELDS ENCLOSED BY'"' TERMINATED BY',' ESCAPED BY '\\'
LINES TERMINATED BY '\r\n';
它应该是这样的:
"14542","2008-01-27 00:00:00","5.2","14668","2008-01-01 00:00:00","0.5"
"14542","2008-01-28 00:00:00","2.6","14668","2008-01-02 00:00:00","-0.7"
"14542","2008-01-29 00:00:00","1.5","14668","2008-01-03 00:00:00","0.2"
"14542","2008-01-30 00:00:00","2.9","14668","2008-01-04 00:00:00","4.7"
"14542","2008-01-31 00:00:00","3.7","14668","2008-01-05 00:00:00","8.2"