You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mssql-cli is a new and interactive command line query tool for SQL Server. This open source tool works cross-platform and is a proud member of the dbcli community.
@@ -29,7 +25,7 @@ Usage: main.py [OPTIONS]
29
25
30
26
Options:
31
27
-S, --server TEXT SQL Server instance name or address.
32
-
-U, --username TEXT Username to connect to the postgres database.
28
+
-U, --username TEXT Username to connect to the database.
33
29
-W, --password Force password prompt.
34
30
-E, --integrated Use integrated authentication on windows.
35
31
-v, --version Version of mssql-cli.
@@ -46,52 +42,42 @@ Options:
46
42
## Examples
47
43
Below are example commands that run against the AdventureWorks database in a localhost server instance. Here is a list of examples:
48
44
49
-
[Connect to a server](#Connect-to-a-server)
50
-
51
-
[Exit mssql-cli](#Exit-mssql-cli)
52
-
53
-
[Navigate multiple pages of query result](#Navigate-multiple-pages-of-query-result)
54
-
55
-
[Quit a query](#Quit-a-query)
56
-
57
-
[Clear screen](#Clear-screen)
58
-
59
-
[Toggle multi-line mode](#Toggle-multi-line-mode)
60
-
61
-
62
-
63
-
### <a id="Connect-to-a-server"></a>Connect to a server
45
+
* [Connect to a server](#connect-to-a-server)
46
+
* [Exit mssql-cli](#exit-mssql-cli)
47
+
* [Navigate multiple pages of query result](#navigate-multiple-pages-of-query-result)
Connect to a server, a specific database, and with a username. -S -d and -U are optional. You can [set environment variables](#Environment-Variables) to set default settings.
66
54
67
55
```bash
68
56
mssql-cli -S localhost -d AdventureWorks -U sa
69
57
```
70
58
71
-
### <a id="Exit-mssql-cli"></a> Exit mssql-cli
72
-
59
+
### Exit mssql-cli
73
60
Press **Ctrl+D** or type:
74
-
75
61
```bash
76
62
quit
77
63
```
78
64
79
-
### <a id="Navigate-multiple-pages-of-query-result"></a>Navigate multiple pages of query result
65
+
### Navigate multiple pages of query result
80
66
If you selecta table that has many rows, it may display the results in multiple pages.
81
67
82
68
- Press **Enter** key to see one row at a time.
83
69
- Press **Space bar** to see one page at a time.
84
70
- Press **q** to escape from the result view.
85
71
86
-
### <a id="Quit-a-query"></a>Quit a query
72
+
### Quit a query
87
73
If you are in the middle of writing a query and would like to cancel it, press **Ctrl+C**
88
74
89
-
### <a id="Clear-screen"></a>Clear screen
75
+
### Clear screen
90
76
If you want to clear the Terminal view, press **Ctrl+K**
91
77
92
78
If you want to clear in Command Prompt, press **Ctrl+L**
0 commit comments