Blog Post

A Prompt AI Experiment

,

Prompt AI released recently and I decided to try a few things with the tool that might help me in database work. I’ve had to do this task, but I had a customer recently ask me about this as well. They were wondering where they were short FKs.

This post showed what I tried with Prompt AI.

This is part of a series of experiments with AI systems. This is part of a series of posts on SQL Prompt. You can see all my posts on SQL Prompt under that tag.

 

Help Me Query the Database

In a recent post, I looked at the MSSQL agent in VS Code to query my database. I decided to try a few things with Prompt AI, working inline. First, I connected to the database and then I asked a question of the AI: who hit the most home runs.

2025-09_0342

From the time I shot the video, I had updated Prompt, and possibly the AI got smarter, because this was the result: I had a qood query.

2025-09_0343

I wanted more, so I asked for seasons. You can see the prompt at the bottom, but seasons were added.

2025-09_0344

Click Accept and then run it and I get the correct answer.

2025-09_0345

How nice would this be for some of the BI analysts to use this to get work done?

Getting Help Fixing the Database

In this db, there aren’t any FKs. I decided to (poorly) ask about this.

2025-09_0347

Note the misspelling. One of the amazing things is the AI recognizes little errors, just as a human would, and corrects them. I get an OK result, but not great.

2025-09_0349

I rewrite my prompt to ask which ones “should” have FKs. I get this:

2025-09_0350

Helpful, but I don’t want to work through this list.

2025-09_0351

I get this. No code, and I feel like I’m talking to a junior dev who is either trying to avoid work or doesn’t have the understanding that I want work done. I’ll try again.

2025-09_0354

I get something I can use. I wouldn’t likely create all these at once, I’d test things, I might start to add these as migration scripts I can deploy over time, after I’ve verified this isn’t going to break an app or cause issues. Or there aren’t already data issues.

2025-09_0355

Still, this is one  of those nice time savings for me writing a script to try and create these or working through time one by one. Now I can just set up tests.

Or ask Prompt AI to help Winking smile

Summary

The new features in Prompt AI let you keep coding inline, but add some AI help to what you do. I’ve seen some neat things, and some frustrating ones, but overall, it’s helpful to produce code.

If you haven’t tried SQL Prompt, download the eval and give it a try. I think you’ll find this is one of the best tools to increase your productivity writing SQL.

Video Walkthrough

https://youtu.be/QdvNG8K-DKY

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating