Running SQL inside VS Code beats alt-tabbing to a separate app: your queries live next to the code that uses them, and your editor’s AI can see both. The question is which extension to install.
Here are the five worth considering in 2026, with real numbers and honest trade-offs. Disclosure up front: DBCode is the extension this site is about. The other four entries are written to be useful anyway, and each one wins at something.
DBCode: the full database IDE
Best for: treating VS Code as your only database tool.
DBCode covers 80+ engines with first-party drivers, from Postgres and MySQL to MongoDB, Snowflake, DuckDB, and Kafka. You get an editable data grid with change previews, schema-aware autocomplete, ER diagrams, SQL notebooks, and charts. On the AI side, Copilot gets tools to read your schema and run queries, an MCP server registers automatically for agents, and you can point completion at local models via Ollama.
The free tier has unlimited connections; visual data editing and a few other features need Pro. It is not open source. Marketplace rating: 4.7 from 71 reviews, 180K+ installs (plus Open VSX installs for Cursor and Windsurf users).
SQLTools: the open source query runner
Best for: a free, MIT-licensed tool when you only need to run queries.
SQLTools has been the default answer for years, and 6.7M installs show it. Query runner, history, bookmarks, autocomplete, connection explorer. It is genuinely free and open source.
The trade-offs: no editable data grid (it generates INSERT statements, you edit SQL by hand), no ER diagrams, no execution plans, and only seven official drivers, with Oracle, Snowflake, and BigQuery left to community-maintained drivers of varying depth. Core releases have been infrequent since late 2025. Marketplace rating: 3.5 from 144 reviews.
Marketplace listing | Full comparison: DBCode vs SQLTools
Database Client: the established freemium all-rounder
Best for: a capable grid-and-explorer tool if 3 connections are enough.
Database Client (by cweijan) is the incumbent with 1.2M installs and active maintenance. It has an editable grid, ER diagrams, backups, SSH and SFTP support, and covers 9 core engines (MySQL, PostgreSQL, SQLite, SQL Server, Redis, MongoDB, Kafka, Neo4j, Snowflake), with more available through a companion JDBC extension.
The free tier caps you at 3 connections; Premium runs $42 a year, with a $300 lifetime option. Newer versions are closed source (the early code was MIT). Marketplace rating: 4.0 from 140 reviews.
Marketplace listing | Full comparison: DBCode vs Database Client
PostgreSQL by Microsoft: the Postgres specialist
Best for: Postgres-only work, if you’re all-in on Azure.
Microsoft shipped an official PostgreSQL extension and took it to general availability in late 2025. The tooling is real: object explorer, IntelliSense, an interactive ER diagram, a query plan visualizer, a @pgsql chat participant, Copilot agent mode, and an MCP server.
Look closer, though, and the agenda shows. Connection browsing is wired to Azure subscriptions, the dashboard is built around Azure Monitor metrics, and the provisioning flows push Azure Database for PostgreSQL and HorizonDB. The results grid stops at sorting, filtering, and export: no in-place editing, so you are still writing UPDATE statements by hand in 2026. Editor support is a two-listing arrangement: the main extension is VS Code Marketplace only, and Cursor gets a separate build published to Open VSX as “cursor-pgsql”. Other forks like Windsurf and VSCodium are not the supported path. And it is one engine; Postgres plus anything else means multiple tools again.
The numbers: 605K installs, rated 4.4, though from just 37 reviews.
mssql by Microsoft: the SQL Server specialist
Best for: SQL Server and Azure SQL, full stop.
Microsoft’s mssql extension is the official way to work with SQL Server in VS Code, and it inherited that job when Microsoft retired Azure Data Studio in early 2026. It has grown into a real IDE: inline data editing, a drag-and-drop schema designer, and Copilot chat and agent mode. Then there are the numbers: 9.4M installs, the most of any database extension, against a 3.1 rating from 196 reviews, the lowest of anything on this list. Being the official tool guarantees installs; it evidently does not guarantee love. One engine, nothing else.
Side by side
| DBCode | SQLTools | Database Client | PostgreSQL (MS) | mssql (MS) | |
|---|---|---|---|---|---|
| Engines | 80+ | 7 official + community | 9 core + JDBC | Postgres only | SQL Server only |
| Edit data in grid | Yes (Pro) | No | Yes | No | Yes |
| ER diagrams | Yes | No | Yes | Yes | Schema designer |
| AI / agent tools | Copilot tools, MCP, local LLMs | No | Limited | Agent mode, MCP | Copilot chat + agent mode |
| Free tier | Unlimited connections | Everything (MIT) | 3 connections | Free | Free |
| Rating (Jul 2026) | 4.7 | 3.5 | 4.0 | 4.4 | 3.1 |
Ratings and install counts fetched from the VS Code Marketplace on July 4, 2026.
How to choose
- You only touch Postgres and live on Azure: Microsoft’s extension is free and official. Just know the results grid is read-only and the Azure push is constant.
- You only touch SQL Server: mssql is the official path, with a 3.1 rating’s worth of caveats.
- You need free and open source: SQLTools, as long as read-mostly query running covers your workflow.
- You work across several databases: that’s the job DBCode was built for: 80+ engines, one interface, AI wired in. Database Client is the alternative if its 9 core engines match your stack and 3 connections are enough on free.
Try any of them in five minutes: install, add a connection, run a query. The one that disappears into your workflow is the right one.