Click here to Skip to main content
15,903,012 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to export mysql database schema with data using query
Posted

1 solution

You could try the below mentioned query
SELECT * INTO OUTFILE '/path/to/my_table_structure.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES  TERMINATED BY '\n'
FROM   INFORMATION_SCHEMA.COLUMNS
WHERE  TABLE_SCHEMA = DATABASE()
 
Share this answer
 
v2
Comments
aparnaChandras 6-Aug-15 5:08am    
it's shell command i want query which i can use in stored procedure
ChauhanAjay 6-Aug-15 5:26am    
updated the answer with a query.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900