We help IT Professionals succeed at work.

MySQL Select INTO OUTFILE question

seopti
seopti asked
on
1,698 Views
Last Modified: 2010-05-18
I run a query which successfully selcts INTO OUTFILE.

But I would like to keep the mysql structure when this select is done, so the result should not be a text file, but the table,rows ... should also be included into this file, is this possible?

The goal is to import these SELECT results again after this select has been performed, but I just can't import a text file output.

Which command should I use instead of INTO OUTFILE in order to be able to import the results back into my MySQL table?
SELECT bizID,bizName,bizAddr,bizCity,bizState,bizZip,bizPhone,bizLive FROM biz_cars GROUP BY bizPhone ORDER BY bizName INTO OUTFILE '/home/carsout.txt'

Open in new window

Comment
Watch Question

Author

Commented:
I know mysqldump, the question is, how can I dump those results which I have selected into a .sql file?
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.