I am trying to export result of query to a text file
using outfile command ERROR 1086 (HY000): File ‘test.txt’ already exists is prompted when i execute it second time.
select * into outfile 'c:/test.txt' from test
I actaully want to replace the existing file.Is there any way to replace the existing file
From the reference – file_name cannot be an existing file
SELECT syntax
So, you should remove old file yourself, or specify another name.