Created
November 28, 2024 12:49
-
-
Save romiras/9bd24cd74aeab463f728ff60bc6c004f to your computer and use it in GitHub Desktop.
Export table column into TSV file in MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -C \ | |
--raw --batch \ | |
--default-character-set=utf8mb4 \ | |
-e "SELECT col1 FROM tbl1" \ | |
-u usr -p db_schema \ | |
| pv > dump-$1.tsv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment