Quantcast
Channel: CodeSection,代码区,SQL Server(mssql)数据库 技术分享 - CodeSec
Viewing all articles
Browse latest Browse all 3160

VS Code working with SQL Server

$
0
0

VS Codeeditor works great and specially when using it in cross-platform environment. So, I decided to try using it connect to one of my SQL Server instance. To configure VS Code editor is simple. Make sure to check my previous blog post for information.

http://www.maxtblog.com/2016/09/vs-code-running-powershell-debug-13/

http://www.maxtblog.com/2016/09/vs-code-running-powershell-code-runner-extensions-23/

http://www.maxtblog.com/2016/09/vs-code-running-powershell-terminal-session-33/

Next we need to look which SQL extension are available. In this case I decided to use “ vscode-mssql ” extension:


VS Code working with SQL Server

After installing, we need to customized their setting by creating connection(s) to our SQL Server. We do this by opening VS Code “ User Preferences ” and under “ Default Settings.json ” we search for the “ vscode-mssql ” settings to be copied over to our working folder “ settings.json ” file.


VS Code working with SQL Server

I configure two database connections, which you can choose by pressing Ctrl-Shift-E before it execute the SQL Script.


VS Code working with SQL Server

The result from the SQL Script will be displayed on the right side of the editor.


VS Code working with SQL Server

One thing to notice, on VS Code version 1.5.3, there’s an extension called “vscode-icons” which gives nice file icons to the working files.


VS Code working with SQL Server
VS Code working with SQL Server

Viewing all articles
Browse latest Browse all 3160