DataGrip Overview, Part 3: SQL Editor
In a Nutshell
DataGrip's SQL editor provides extensive productivity features including live templates for rapid statement creation, intelligent auto-completion based on schema relationships, and real-time error detection for issues like unresolved references or mismatched insert columns. Code modifications are streamlined through shortcuts like Shift+F6 for renaming, Alt+Enter for intention actions, and multi-cursor editing for bulk changes. The editor supports customizable formatting, context-aware templates that leverage object types, and editor splitting for side-by-side comparison.
These notes were generated by AI and may contain inaccuracies.
Typing SEL and pressing the tab key quickly creates a select statement, then allows selection of the desired table. This demonstrates live templates, which are ready-made snippets for commonly used cases. Pressing command J displays a list of all available snippets, with template shortcuts on the left side of the window and descriptions on the right side.
The INS direct template creates a simple insert statement. The template is called first, then the table is selected, suggested columns are accepted, and values are entered. Live templates can be edited in the live templates settings by navigating to the SQL section, which displays a list of all templates.
The SEL template can be updated to use the variable {$END$}, which determines where to place the writing cursor after the query is created. Placing this variable directly after the alternate tag (wildcard) results in the cursor being positioned after the alt tag when the live template is called. Templates are highly customizable through these settings.
Right-clicking on an object displays several options for creating a new query using that object within the SQL scripts menu. The most common method creates a SELECT statement for the table. This mechanism is called direct context templates, allowing creation of common statements directly from the database explorer while taking into account the object type (such as table or view) and the SQL dialect of the current data source.
Sign in to read the full notes
Get access to AI-generated notes, topic timestamps, and more.





