MySQL Forums
Forum List  »  Newbie

INSERT INTO file with parameter - help
Posted by: three eye
Date: August 20, 2021 04:48PM

Hi guys,
I'm a total newbie in mySQL.
All I'm trying to do is to create a stored procedure with an input string and put it in a text file (in a new line).

I got this:
DELIMITER $$

CREATE PROCEDURE export_static()
BEGIN
SELECT * INTO OUTFILE '/tmp/file_name.txt' FROM Table1;
END $$

DELIMITER ;

from https://stackoverflow.com/questions/2333806/how-to-store-output-of-a-stored-procedure-on-to-disk

But how do I input a string and just output it into a file (without having a table)?

Thanks for the help

Options: ReplyQuote


Subject
Written By
Posted
INSERT INTO file with parameter - help
August 20, 2021 04:48PM


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.