IntelliJ IDEA 2019.2 Help

Database tools and SQL

The database management functionality in IntelliJ IDEA is supported by the Database tools and SQL plugin. The Database tools and SQL plugin provides support of all the features that are available in DataGrip, the standalone database management environment for developers. With the plugin, you can query, create and manage databases. Databases can work locally, on a server, or in the cloud. The plugin supports MySQL, PostgreSQL, Microsoft SQL Server, SQLite, MariaDB, Oracle, Apache Cassandra, and others. See the full list of supported vendors in Connecting to a database.

Getting started

Connect to a databaseConfigure a database connectionRun a query

Learn how to connect to all supported database vendors.

Learn how to connect to a database with the JDBC driver, configure SSH and SSL, customize settings of the existing connection.

Working with a database console and running a query.

Work with query resultsSubmit your changes to a databaseConfiguring database connections

Review query results, save them to a file or copy to a clipboard, compare two result sets.

Choose how to submit your changes to a database: manually or automatically.

Learn how to connect to a database with the JDBC driver, configure SSH and SSL, customize settings of the existing connection.

Working with tables

TablesColumnsRowsCells

Learn how to create, delete, compare tables.

Basic operations with columns.

Operations with rows and navigation in the set of rows.

Editing cells, viewing quick documentation, saving binary large objects.

Configuring settings

Configuring the SQL code styleManaging data sourcesCustomizing the database tree view

Tweak settings of our formatter to meet your SQL writing standards.

Share your data source settings between different projects, different computers, and IDE installations.

Customize the view of your data sources in the Database tool window.

Working with SQL code

SQL statementsMigrationsInjected SQL statements

Run all SQL statements or only a subquery, save the result of the statement in a file, edit INSERT statements in a table format.

Generate migration scripts, run migrations with a built-in tool.

Inject the language you need into your SQL code.

Miscellaneous

Creating diagramsConnectivity problems

You can visualize execution plans, build a query map, or generate a diagram for a database object.

Consult the Troubleshooting section if you experience any difficulties with database connection.

Last modified: 17 October 2019