Last active
December 18, 2015 21:49
-
-
Save carlossanchezp/5849953 to your computer and use it in GitHub Desktop.
Opción 2: Exportar una consulta SQL a CSV desde terminal En este caso se asume que quieres los campos separados por tabulación para que luego puedas tratarlo en un Excel o similar. Tenemos que utilizar dos parámetros básicos: -e: Indicando que la consulta SQL va entre comillas
-B: para indicar que los campos van separados por tabs Finalmente com…
This file contains 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 -u root -p MYDATABASE -e "select * from products" -B > fichero33.csv | |
o en consola podemos utilizar \T: | |
select * from products \T resultadoooooooo.sql; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment