dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.32k stars 656 forks source link

id truncated when exporting csv #1094

Closed longmenzhitong closed 1 year ago

longmenzhitong commented 1 year ago

[Environment] Windows 11, cygwin [Description] My ID is: 1582917533873852417. After I export it to a csv it appears to a scientific notation. And its value becomes to 1582917533873850000, which I think has been truncated. But if I open the csv by notepad, I can see the ID is correct. [Operation] \T csv ; \o ~/test.csv; select id from mytable [Question] I realize that this is probably not a mycli problem, but is there anyway in mycli to solve or avloid it? Much thanks for any help :-).

longmenzhitong commented 1 year ago

I found a way to avoid this problem. Create a new .xlsx file and import the csv, choose text format in this progress. But this is not very convenient, is it?