SQL Prompt 11

AI to empower your SQL and database development

SQL Prompt’s AI-powered features help you to write, review, and optimize SQL faster by combining its understanding of your database schema and SQL expertise, with the power of generative AI and machine learning.  Write and modify SQL accurately using natural language, get clear explanations of unfamiliar code, and uncover performance-boosting index suggestions in seconds — all without leaving SSMS or Visual Studio. The AI-powered features are opt-in to give you control over how and when you adopt AI into your workflow.

Contents

What AI features exist in SQL Prompt?

We have three AI-powered features in SQL Prompt:

  1. AI in SQL Prompt - Inline AI helper
  2. Redgate Assistant (Preview) - AI chat
  3. Query Index Analysis - AI-based query index performance evaluator

Both AI in SQL Prompt and Redgate Assistant (Preview) use public AI models.

1. Prompt AI

AI in SQL Prompt provides the following functionality directly in your SSMS/VS query editor window:

  • Natural language AI prompts (Text-to-SQL) - Write and modify SQL using natural language. SQL Prompt AI transforms your words into schema-aware AI requests that will create a response from our Prompt AI services that will be directly inserted into your SSMS query window. Modifying SQL is easy too, just highlight your code and instruct SQL Prompt to change it using natural language in your query window. AI responses will work with SQL Prompt’s formatting, refactoring and code analysis features to ensure code is consistent and accurate. 
  • Explain SQL - Make sense of legacy code, complex logic, or someone else’s work fast. With SQL Prompt’s Explain SQL feature you can highlight your chosen SQL and get an instant translation of what the code does in everyday language.
  • Fix SQL - Fix syntax or logical errors with a click. SQL Prompt will identify errors in SSMS and attempt to resolve them using Prompt AI.
  • Optimize SQL - Speed up slow queries by using the Optimize SQL action in Prompt AI. The highlighted SQL will be analyzed, optimized, and annotated by Prompt AI. It will aim to apply only safe recommendations, while more impactful changes—such as creating indexes—will be provided as commented suggestions.
  • AI code completion (Preview) - Generates multi-line blocks of code based on your query's context and even natural language comments, allowing you to write complex queries faster and with less effort, right inside your query window.
  • Intelligent context-aware suggestions -  Prompt AI offers two types of contextual-aware suggestions to help you form your AI prompts:
    • Initial personalized suggestions - If Generate initial suggestions using SQL History option is enabled, SQL Prompt AI will create context-aware suggestions based on randomly selected recent SQL queries from SQL History.
    • Follow-up suggestions - These are automatically generated in the Prompt AI window after you first AI prompt is processed and provide contextual-aware potential continuations to your previous AI prompts (e.g. introduce additional filters on a SELECT statement).

Please see working with SQL Prompt AI for more details on existing functionality.

2. Redgate Assistant (Preview)

Redgate Assistant (Preview) is a general-purpose chatbot with SQL expertise designed to help with all aspects of database development. As such, it's capable of performing many tasks.

Additionally, it's enhanced with SQL Prompt functionality to further refine its skillset and capabilities.

You might ask Redgate Assistant to:

  • Perform a code review on one of your queries.
  • Write a new query from scratch based on your requirements.
  • Give advice on how best to create an index for a table.
  • Ask to explain how a certain script works.
  • Fix errors in a given query.
  • Optimize T-SQL for performance and effectiveness.

See Redgate Assistant documentation for further details.

3. Query Index Analysis

Query Index Analysis, when triggered by the user, leverages an internal Redgate LLM (and not a third party LLM), and offers the following functionality:

  • Improve SQL query performance - Get clear, actionable advice on what indexes you need to improve query performance. Query Index Analysis evaluates the potential impact of different indexes and delivers smart recommendations for improvement.

Query Index Analysis will provide a recommendation to the user, and does not itself change the database.

Find out more

Go to Prompt AI features to find out more about each of the above and how they help with your workflows.



This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved


Didn't find what you were looking for?