AI SQL Completion
AI SQL Completion provides context-aware suggestions while you write SQL, helping you finish statements faster.
What It Does
- Extends the existing rule-based SQL prompt mechanism with AI-based contextual completion.
- Shows inline suggestions in gray text when a completion is available.
- Lets you accept the current suggestion with the Tab key.
- Works whether you start with SQL fragments or plain-language intent.
Prerequisites
- Open the SQL Console for the target data source.
- Enable AI SQL Completion in Settings or the window settings.
Steps
- Open the SQL Console for the target data source.
- Enable AI SQL Completion in the window settings.
- After it is enabled, an AI icon appears in the upper-right corner of the SQL editor.
- Type SQL, or directly describe what you want to do in natural language.
- When the AI icon lights up and then turns off, the editor shows a gray completion suggestion.
- Press Tab to accept the suggestion. If you do not want it, continue typing manually.
Common Scenarios
- Completing multi-table query structures with many fields
- Continuing long filter, sort, or group-by clauses
- Thinking through business logic while gradually filling out SQL
- Starting from natural-language intent and turning it into a more complete SQL draft
Tips
- Treat completion as an input-acceleration tool. It does not replace result validation.
- If you want to generate larger SQL drafts directly from natural language, combine it with Text2SQL / Chat2SQL.