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 or ⇧⌘F10⇧⌘F10 or ⇧⌘F10⇧⌘F10 or ⇧⌘F10^ ⇧ F10, ⌃⇧F10 or ⌃⇧F10^ ⇧ F10, ⌃⇧F10 or ⌃⇧F10 in the Database tool window). See Working with Database Consoles.
- Table editor that provides a GUI for working with table data (⌘↓, F4, ⌘↓ or F4F4 or F4F3 or F3F4, F4 or F4F4, F4 or F4 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 or ⌘J⌘J or ⌘J^ J, ⌃J or ⌃J^ J, ⌃J or ⌃J). - Auto-completion and highlighting of SQL keywords, and table and column names.
- Data type prompts for columns (⌘P or ⌘P⌘P or ⌘P⌃⇧Space or ⌃⇧Space^ ⇧ Space, ⌃⇧Space or ⌃⇧Space⇧ ⌥ P, ⌥⇧P or ⌥⇧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 or ⌘F12⌘F12 or ⌘F12⌘O or ⌘O^ F12, ⌃F12 or ⌃F12^ F12, ⌃F12 or ⌃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, F1, ⌃J or ⌃Button2 Click⌃J, ⌃Button2 Click, ⌃J or ⌃Button2 Click⌥Button2 Click, F2, ⌥Button2 Click or F2^ Q, ⌃Q or ⌃Q^ Q, ⌥ Button2 Click, ⌃Q, ⌥Button2 Click, ⌃Q or ⌥Button2 Click). See e.g. Using the quick documentation view.
-
Navigation capabilities, e.g.
- From a table or column reference to its definition: ⌘B, ⌘Button1 Click, Button2 Click, ⌘B, ⌘Button1 Click or Button2 Click⌘B, ⌘Button1 Click, Button2 Click, ⌘B, ⌘Button1 Click or Button2 ClickF3, ⌃Button1 Click, F3 or ⌃Button1 ClickF12, ⇧ F2, ^ B, ^ Button1 Click, Button2 Click, F12, ⇧F2, ⌃B, ⌃Button1 Click, Button2 Click, F12, ⇧F2, ⌃B, ⌃Button1 Click or Button2 Click^ ⌥ G, Escape, Period, ⌥ Period, ^ Button1 Click, ⌃⌥G, ⎋, ., ⌥., ⌃Button1 Click, ⌃⌥G, ⎋, ., ⌥. or ⌃Button1 Click.
- To the view of a table or column in the Database tool window: ⌥F1 or ⌥F1⌥F1 or ⌥F1⌥⌘W or ⌥⌘W⌥ F1, ⌥F1 or ⌥F1⌥ F1, ⌥F1 or ⌥F1 .
- By means of the navigation bar: ⌘↑, ⌥↖, ⌘↑ or ⌥↖⌥↖ or ⌥↖⌥⌘B or ⌥⌘B⌥ Home, ⌥↖ or ⌥↖⌥ Home, ⌥↖ or ⌥↖.
- By means of the Switcher: ⌃⇥, ⌃⇧⇥, ⌃⇥ or ⌃⇧⇥⌃⇥, ⌃⇧⇥, ⌃⇥ or ⌃⇧⇥⌃⇥, ⌃⇧⇥, ⌃⇥ or ⌃⇧⇥^ Tab, ^ ⇧ Tab, ⌃⇥, ⌃⇧⇥, ⌃⇥ or ⌃⇧⇥^ X, B, ⌃X, B or ⌃X, B.
- Database diagrams (⌥⌘U or ⌥⌘U⌥⌘U or ⌥⌘U⌥⌘U or ⌥⌘U^ ⌥ U, ⌃⌥U or ⌃⌥U^ ⌥ U, ⌃⌥U or ⌃⌥U or ⌥⇧⌘U or ⌥⇧⌘U⌥⇧⌘U or ⌥⇧⌘U⌥⇧⌘U or ⌥⇧⌘U^ ⇧ ⌥ U, ⌃⌥⇧U or ⌃⌥⇧U^ ⇧ ⌥ U, ⌃⌥⇧U or ⌃⌥⇧U in the Database tool window).