Skip to content

Instantly share code, notes, and snippets.

@niisar
Created October 9, 2014 09:05
Show Gist options
  • Save niisar/fbc80da96f80473bdc15 to your computer and use it in GitHub Desktop.
Save niisar/fbc80da96f80473bdc15 to your computer and use it in GitHub Desktop.
output to file in mysql
select `TABLE_NAME`,`COLUMN_NAME`,`ORDINAL_POSITION`,`COLUMN_DEFAULT` from information_schema.columns where TABLE_SCHEMA = 'hhims' order by TABLE_NAME into outfile 'd:\del.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment