时间:2021-07-01 10:21:17 帮助过:53人阅读

Figure-2:格式化显示
2. 安装 下面就来试用下这款工具吧。这里仅以CentOS7下演示,其他平台可参考SQL Server Blog,或者在Github上有更详细的安装指引:https://github.com/dbcli/mssql-cli/blob/master/doc/installation_guide.md 2.1 安装最新的EPEL(Extra Packages for Enterprise Linux) [root@134test ~]# yum install epel-release 2.2 安装相关依赖 [root@134test ~]# yum install libunwind libicu python-pip 2.3 安装mssql-cli [root@134test ~]# pip install mssql-cli 2.4 使用mssql-cli登录 [root@134test ~]# mssql-cli -U sa Password: Version: 0.8.0 Mail: sqlcli@microsoft.com Home: http://github.com/dbcli/mssql-cli master>SELECT @@version +--------------------+ | (No column name) | |--------------------| | Microsoft SQL Server 2017 (RC2) - 14.0.900.75 (X64) Jul 27 2017 08:53:49 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (CentOS Linux 7 (Core)) | +--------------------+ (1 row affected) Time: 0.103s master> 3. 体验 在Xshell使用mssql-cli,有以下几点心得,欢迎补充。

Figure-3:字段的内容显示不完整
4. 总结
在命令行环境下有所增强的功能还是挺好的,适合于没有图形化界面的场景下使用。如果用于开发、管理或查询等,有条件的情况下,还是建议在Windows平台下使用SSMS吧。
另外再补充一下:http://www.codeplex.com/已经不再更新,要下载SQL Server的示例数据库直接到Github(https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks)下载更方便。
体验mssql-cli
标签:list 方便 高亮 直接 适合 美化 bit result master