After adding to my Ubuntu 18.04 system Microsoft's repository
deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main
in /etc/apt/sources.list.d/mssql-release.list, I now get two versions of the unixodbc package offered:
$ apt-cache showpkg unixodbc
Package: unixodbc
Versions:
2.3.7 (/var/lib/apt/lists/packages.microsoft.com_ubuntu_18.04_prod_dists_bionic_main_binary-amd64_Packages) (/var/lib/dpkg/status)
[...]
2.3.4-1.1ubuntu3 (/var/lib/apt/lists/www-uxsup.csx.cam.ac.uk_pub_linux_ubuntu_dists_bionic_universe_binary-amd64_Packages)
[...]
Dependencies:
2.3.7 - libc6 (2 2.14) odbcinst1debian2 (2 2.3.7) libodbc1 (2 2.3.7) unixodbc-bin (3 2.3.7) unixodbc-bin:i386 (3 2.3.7) unixodbc:i386 (32 (null))
2.3.4-1.1ubuntu3 - libc6 (2 2.14) libodbc1 (2 2.3.1) libreadline7 (2 6.0) odbcinst1debian2 (2 2.3.1) unixodbc-bin (3 2.2.4-1) unixodbc-bin:i386 (3 2.2.4-1) unixodbc:i386 (32 (null))
[...]
So it seems both Microsoft and Ubuntu provide versions of the unixodbc package, which contains the isql tool. And the system install Microsoft's unixodbc by default (because of the higher version number?).
But the two are not equivalent:
As you can see from the above dependencies, Ubuntu's unixodbc-2.3.4-1ubuntu3 has been linked against the libreadline7 library, such that the isql tool uses the readline command-line editor and therefore can deal with cursor movements, which is extremely convenien.
Unfortunately, Microsoft's unixodbc-2.3.4 was not linked with libreadline7, and therefore sadly does not support any cursor keys in its built-in command prompt (e.g., for inline editing or to access previous command history).
Why does Microsoft have to provide an alternate version of unixodbc (isql) under the same package name?
If you must provide your own version of unixodbc (isql) for some reason, could you please also compile it with readline support included, like the Ubuntu version?