Quantcast
Channel: Dynamics 365 Business Central/NAV User Group
Viewing all articles
Browse latest Browse all 11285

Blog Post: How Do I: Use Visual Studio Code instead of SSMS?

$
0
0
Using Visual Studio Code as a replacement for Sql Server Management Studio is very easy. Once you have downloaded and installed VSCode ( download it here ), you need to add the mssql extension in Visual Studio Code, which you can find here . Then create a new file in VSCode and give it the extension .sql. The mssql extension enables mssql commands and T-SQL IntelliSense in the editor when the language mode is set to SQL .   Press CTRL+N . Visual Studio Code opens a new ‘Plain Text’ file by default. Press CTRL+K,M and change the language mode to SQL . Alternatively, open an existing file with .sql file extension. The language mode is automatically SQL for files that have the .sql extension. Then you need to connect to your SQL Server: In VS Code, press CTRL+SHIFT+P (or F1 ) to open the Command Palette. Type sql to display the mssql commands. Select the MS SQL: Connect command. You can simply type sqlcon and press ENTER . Follow the prompts to specify the connection properties for the new connection profile. After specifying each value, press ENTER to continue. Verify your connection in the status bar. Now you need to see your databases on your SQL Server. Simply use the following query: Press CTRL+SHIFT+E to execute the Transact-SQL commands. View the results in the query window. Then you can query any table in any database, for example: Press CTRL+SHIFT+E to execute the Transact-SQL commands. View the results in the query window. On the View menu, select Toggle Editor Group Layout to switch to vertical or horizontal split layout. Voila, it’s as easy as this! More information and examples are available here:  Use Visual Studio Code to create and run Transact-SQL scripts for SQL Server .

Viewing all articles
Browse latest Browse all 11285

Trending Articles