how do i output data to a text file in mysql
i want to output table descriptions and content into 2 seperate files, 1 for table description and 1 for the contents of the table.
| SitePoint Sponsor |
how do i output data to a text file in mysql
i want to output table descriptions and content into 2 seperate files, 1 for table description and 1 for the contents of the table.
This post is brought to you in association with Carling - The UK's Premier Lager
To export your data your can use the "INTO OUTFILE" clause. Basically it would look like:
To export your data structures you would have to capture the DESCRIBE command's output. I am sure there is another way, just haven't found it in the old documentation I have. Downloading the new documentation now.Code:SELECT * FROM table WHERE x=y INTO OUTFILE 'tabledata'
Bookmarks