Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to export a csv using INTO syntax of mysql
12-13-2011, 04:42 AM
Post: #1
Sad how to export a csv using INTO syntax of mysql
Guys if you want to study mysql from scratch click the above mysql tab.
Here we are going to learn how to export a database table as a csv file in mysql.
Assuming you have a table "login" or just create a table login or whatever name.
Create table login(name varchar(20),pass varchar(20));
then insert some values.

In mysql console type as shown below.

mysql> select * from login into outfile 'c:/login.csv' fields
terminated by ',
'enclosed by '"'lines terminated by "";


Now you will find csv file in c:/login.csv. Any doubts ask us.

Happy coding
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
Tongue Retrieve values between two numbers in mysql rajasri 0 197 12-13-2011 04:39 AM
Last Post: rajasri
Smile How to backup database of mysql using bat rajasri 0 177 12-13-2011 02:41 AM
Last Post: rajasri
Wink Exception:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for colu rajasri 0 360 12-13-2011 02:09 AM
Last Post: rajasri

Forum Jump:


User(s) browsing this thread: 1 Guest(s)


WE will share important jobs and updates on facebook so like us to get updates