QueryWrite SQL
Inline Completion
Inline Completion uses AI to enhance SQL coding productivity and generate schema aware SQL directly within your editor, enabling you to create complex queries, or ask natural language questions.
-
Start Typing a SQL Query:
-
Begin writing your SQL query or command in a DBCode-supported environment, such as a
.sqlfile or a DBCode Notebook. -
As you type, Inline Completion displays light grey text suggesting how to complete your query based on the context.
-
To ask a question, you can enter the text as an SQL comment, such as
-- What find all the users with the last name "Smith"?and the LLM will generate a query for you, using knowledge of the schema of your database.

-
-
Accept Suggestions:
- Press
Tabto insert the suggested code where your cursor is.
- Press
-
Dismiss Suggestions:
- To ignore a suggestion, simply keep typing, and the prediction will adjust dynamically to the new input.
-
Dynamic Updates:
- Inline Completion updates its predictions in real-time as you continue typing, refining suggestions based on the context of your query.

Benefits of Inline Completion
Section titled “Benefits of Inline Completion”-
Speed: Write queries faster by leveraging intelligent predictions that eliminate unnecessary typing.
-
Accuracy: Reduce syntax errors with compliant suggestions tailored to your database schema.
-
Convenience: Avoid interruptions by getting in-line predictions directly in the editor, without needing external references.
Inline Completion is a powerful feature for SQL developers, streamlining query creation by predicting and suggesting contextually appropriate completions. Whether you’re a beginner or a seasoned professional, this tool enhances productivity and coding efficiency in Visual Studio Code.
Model Selection
Section titled “Model Selection”DBCode uses one of two model sources for inline completion:
- Custom Model (when it is your active AI provider)
- DBCode Hosted Model (otherwise)
For details on how models are selected and configured, see AI Models and Configuration.
Privacy and Security
Section titled “Privacy and Security”Inline completion shares your database schema (table and column names) with AI models to provide accurate suggestions. Only the database structure is sent - never actual data values or credentials.
For security considerations, see AI Privacy and Security.