MySQL Forums
Forum List  »  General

issue - Export data BUT overwriting an existing file
Posted by: Alexandre Salomé
Date: September 04, 2019 08:58AM

Hi
Today I use the command below to export my DB into a file ( on windows: C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/devices.txt'):

----------------------------------------------------------------------------
SET @FOLDER = 'C:/ProgramData/MySQL/MySQL Server 5.7/Uploads/';
SET @NOME_ARQUIVO = 'Devices';
SET @EXTENSAO = '.txt';

SET @CMD = CONCAT("
........
);

PREPARE statement FROM @CMD;

EXECUTE statement;
----------------------------------------------------------------------------



The issue is when the file exist, I always need delete it before [otherwise export does not occur].

Is there a syntax to force export overwriting it [without necessity exclude this file?]

Thank you in advance

Alex

Options: ReplyQuote


Subject
Written By
Posted
issue - Export data BUT overwriting an existing file
September 04, 2019 08:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.