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.
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:
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:
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.