How to Use VS Code to Run SQL on a Database



How to Use VS Code to Run SQL on a Database

How to Use VS Code to Run SQL on a Database

VSCode is a popular editor for development. If you have any need to work with an SQL database, then you’ll likely be using another IDE as well, such as SSMS, MySQL Workbench, pgAdming, or Oracle SQL Developer.

However, if you use VSCode, you can access the database directly from within VSCode. You can do this by using an extension.

This means you can run queries and see your data all within the same application, saving time from using different applications. You may also find it easier to use one application instead of two.

It’s not as powerful as a full SQL IDE, but for simple stuff, it’s quite useful.

In this video, you’ll learn how to install the extension and drivers in VSCode, how to create connections to SQL Server, MySQL, and PostgreSQL, how to run some SQL queries, and some features of the extension (including the Run Query keyboard shortcut).

The extension we use does not support Oracle, but there is a different extension for that.

Timestamps:
00:00 Introduction
00:29 Prerequisites
01:09 Install extension and drivers
03:53 Adding a new connection
04:22 Create MySQL connection
06:14 Create SQL Server connection
07:48 Create PostgreSQL connection
09:14 Connect to database
09:47 Write and run SQL
12:38 More features

/// RESOURCES
Get my free SQL Cheat Sheets for Oracle, SQL Server, MySQL, and Postgres here: https://www.databasestar.com/get-sql-cheat-sheets/
SQL Roadmap: an overview of SQL topics, which is a great place to start: https://www.databasestar.com/sql-roadmap/
Contact me here for questions, sponsorship requests, and more: https://www.databasestar.com/contact/
Want to take your database and SQL skills to the next level? Sign up for Database Star Academy, the online platform for database development and SQL. Check it out here: https://www.databasestar.com/dsa/

Comments are closed.