DataGrip makes your SQL coding as easy and effective as possible. It completes keywords and identifiers, generates SQL, detects probable bugs in your SQL code and suggests the best options to fix them on the fly.
As soon as DataGrip finds a way to alter your code, you can apply it by pressing Alt+Enter. You’ll see the pop-up with Intention Actions, which cover a wide range of situations from warnings to optimization suggestions. Some of the most useful ones include:
AND
operators to one IN
operatorCode completion is pretty fast in DataGrip. You get a list of suggestions as you type: our main goal is zero-latency here. Completion is automatic, but you can invoke it at any moment by pressing Ctrl+Space. It is also context-aware, which means that it tries to only suggest the objects and keywords you may need at any particular moment.
DataGrip detects probable bugs in your SQL code and suggests the best options to fix them on the fly. The IDE will notify you if there are:
INSERT
statementSometimes your code works but contains something that shouldn’t be there. DataGrip will warn you in case of:
WHERE
clauseSince using wildcards is not recommended in many cases, DataGrip can expand it to list all columns of the table for you. In the case of conflicts, identifiers will be qualified.
DataGrip can give you information about the names and types of parameters for functions and procedures as well. To see this tooltip press Ctrl+P.
To assist you in inserting valid values, the IDE hints at the name and type of corresponding columns. Invoke it by pressing Ctrl+P.
Try enabling Settings → Editor → General → Appearance → Show parameter name
hints:
DataGrip will prompt you with information about the column names in
INSERT
statements.