This feature is supported in Ultimate edition only.
In this section:
Databases and SQL support
IntelliJ IDEA features for working with databases and SQL include:
- Integration with the most popular database management systems such as
Oracle
,
PostgreSQL
,
MySQL
,
SQL Server
and others.
To be able to work with your databases,
you should define them as data sources. See Managing Data Sources. - Database tool window for managing data structures in your databases (). See Working with the Database Tool Window.
- Database consoles that let you compose and execute SQL statements as well as analyze and modify retrieved data (⇧⌘F10⇧⌘F10⇧⌘F10^ ⇧ F10^ ⇧ F10 in the Database tool window). See Working with Database Consoles.
- Table editor that provides a GUI for working with table data (⌘↓F4F3F4F4 in the Database tool window). See Working with the Table Editor.
- SQL code generation and editing features in the database consoles and the editor, e.g.
- Predefined code snippets (a.k.a. live templates) such as for
CREATE TABLE,SELECT,INSERT,UPDATEand other statements (⌘J⌘J^ J^ J). - Auto-completion and highlighting of SQL keywords, and table and column names.
- Data type prompts for columns (⌘P⌘P⌃⇧Space^ ⇧ Space⇧ ⌥ P).
Standardized and DBMS-specific SQL dialects are supported.
- Predefined code snippets (a.k.a. live templates) such as for
- Structure view for tables in the table editor and Database Console tool window as well as for open database consoles and SQL files (⌘F12⌘F12⌘O^ F12^ F12). See e.g. Using the Structure view to sort data, and hide and show columns.
- Quick documentation view for database objects and table cells (F1⌃J⌥Button2 Click^ Q^ Q). See e.g. Using the quick documentation view.
- Navigation capabilities, e.g.
- From a table or column reference to its definition: ⌘B⌘BF3F12^ ⌥ G.
- To the view of a table or column in the Database tool window: ⌥F1⌥F1⌥⌘W⌥ F1⌥ F1 .
- By means of the navigation bar: ⌘↑⌥↖⌥⌘B⌥ Home⌥ Home.
- By means of the Switcher: ⌃⇥⌃⇥⌃⇥^ Tab^ X, B.
- Database diagrams (⌥⌘U⌥⌘U⌥⌘U^ ⌥ U^ ⌥ U or ⌥⇧⌘U⌥⇧⌘U⌥⇧⌘U^ ⇧ ⌥ U^ ⇧ ⌥ U in the Database tool window).