Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodePilot inside SQL Server SSMS

As far as I can see the only options currently for copilot/ChatGPT SQL assistance is to generate queries outside of SSMS.

The real power would be within the SSMS, with access to table definitions, SP's etc. I could see this saving me hours of dev time. Anyone know if there's anything on the cards or whether MS allows for external tools to be incorporated into SSMS?

like image 329
Sami.C Avatar asked Jan 29 '26 14:01

Sami.C


1 Answers

After some research, I ended up using the 'SQL Server (mssql) VSC extension which you can install here https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql

To save a bunch of googling here's what I did to get up and running.

  1. Install the extension.

enter image description here

  1. Create and save a new *.sql file in your explorer somewhere (the below won't work unless a .sql file has focus

ctrl+shift+P - select MS SQL: Connect

enter image description here

  1. Paste in the connection string (from your appsettings.json etc) - press enter through everything else if you like.

You should now see your database in the SQL Server tab in the left pne.

enter image description here

Right click your DB to create a new query.

enter image description here

Click the green play button to run the query (do not use F5)

enter image description here

Not a perfect approach but good enough for some quick SQL debugging and can never remember how to insert a record etc.

like image 119
Peter Avatar answered Jan 31 '26 04:01

Peter