Exporting results of a Mysql query to excel?

后端 未结 5 1550
有刺的猬
有刺的猬 2020-11-29 00:36

My requirement is to store the entire results of the query

SELECT * FROM document 
WHERE documentid IN (SELECT * FROM TaskResult WHERE taskResult = 2429)
         


        
5条回答
  •  [愿得一人]
    2020-11-29 01:14

    Use the below query:

     SELECT * FROM document INTO OUTFILE 'c:/order-1.csv' FIELDS TERMINATED BY ','  
     ENCLOSED BY '"' LINES TERMINATED BY '\n';
    

提交回复
热议问题