We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Copy data from MySql table to a text file

Cristi_E
Cristi_E asked
on
Medium Priority
474 Views
Last Modified: 2013-12-13
Hello!
   How can i copy data from MySql table to a text file using SQL commands?
Comment
Watch Question

Raja Jegan RSQL Server DBA & Architect, EE Solution Guide
CERTIFIED EXPERT
Awarded 2009
Distinguished Expert 2019

Commented:
This should help you out:

SELECT ... INTO OUTFILE 'file_name'

Kindly refer below for more options and references:

http://dev.mysql.com/doc/refman/5.0/en/select.html

Author

Commented:
Can you help me with some sample code?    I'm not too fammiliar with SQL.

Thanks in advance!
SQL Server DBA & Architect, EE Solution Guide
CERTIFIED EXPERT
Awarded 2009
Distinguished Expert 2019
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*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.