# Rows

In the data editor, you can add, clone, delete, and navigate between related rows.

![rows in the data editor](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_rows_in_the_data_editor.png)

## Manipulating rows

Procedure: Add a row

1. Click ![The Add New Row icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.general.add_dark.svg) Add Row on the toolbar. Alternatively, right-click the table and select Add Row from the context menu.

2. Press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)).

3. Make your changes.

4. [(Optional) Submit and commit your changes to the database.](#submit_and_commit_your_changes_to_the_database)

> **Tip:**
> Note that the context menu Clone Row command `Ctrl+D` (Windows), `⌘ D` (macOS), `⌘ D` (IntelliJ IDEA Classic (macOS)), `⌘ D` (macOS System Shortcuts), `Ctrl+D` (XWin), `Ctrl+D` (GNOME), `Ctrl+D` (KDE), `Meta+D` (Emacs), `Ctrl+Shift+D` (Sublime Text), `⌘ ⇧ D` (Sublime Text (macOS)), `Ctrl+D` (NetBeans), `Ctrl+D` (Visual Studio), `⌘ D` (Visual Studio (macOS)), `Ctrl+D` (Eclipse), `Ctrl+D` (Eclipse (macOS)) can be used as an alternative.

Procedure: Delete a row

1. Select a row or rows.

To select multiple rows, click numbers in the gutter. Also, you can press `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (NetBeans), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS)) and click the necessary rows.

2. Click ![the Delete Row icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.general.remove_dark.svg) Delete Row on the toolbar. Alternatively, press `Ctrl+Y` (Windows), `⌘ ⌫` (macOS), `⌘ Y` (IntelliJ IDEA Classic (macOS)), `⌘ ⌫` (macOS System Shortcuts), `Ctrl+Y` (XWin), `Ctrl+Y` (GNOME), `Ctrl+Y` (KDE), `Ctrl+Y` (Emacs), `Ctrl+Shift+K` (Sublime Text), `⌃ ⇧ K` (Sublime Text (macOS)), `Ctrl+E` (NetBeans), `Ctrl+L` (Visual Studio), `⌘ ⇧ L` (Visual Studio (macOS)), `Ctrl+D` (Eclipse), `⌘ D` (Eclipse (macOS)) or `Delete` (Windows), `⌦` (macOS), `⌦` (IntelliJ IDEA Classic (macOS)), `⌦` (macOS System Shortcuts), `Delete` (XWin), `Delete` (GNOME), `Delete` (KDE), `Delete` (Emacs), `Delete` (Sublime Text), `⌦` (Sublime Text (macOS)), `Delete` (NetBeans), `Delete` (Visual Studio), `⌦` (Visual Studio (macOS)), `Delete` (Eclipse), `⌦` (Eclipse (macOS)).

3. [(Optional) Submit and commit your changes to the database.](#submit_and_commit_your_changes_to_the_database)

Procedure: Remove all rows in a table

* Right-click a table and navigate to `Object Actions | Truncate…` .

![Remove all rows in a table](https://resources.jetbrains.com.cn/help/img/idea/2026.2/remove_all_rows_of_table.png)

Procedure: Clone rows

1. You can clone a selected row. The copy of the row is added to the end of the table.

To clone a row, right-click the row and select Clone Row. Alternatively, select the row and press `Ctrl+D` (Windows), `⌘ D` (macOS), `⌘ D` (IntelliJ IDEA Classic (macOS)), `⌘ D` (macOS System Shortcuts), `Ctrl+D` (XWin), `Ctrl+D` (GNOME), `Ctrl+D` (KDE), `Meta+D` (Emacs), `Ctrl+Shift+D` (Sublime Text), `⌘ ⇧ D` (Sublime Text (macOS)), `Ctrl+D` (NetBeans), `Ctrl+D` (Visual Studio), `⌘ D` (Visual Studio (macOS)), `Ctrl+D` (Eclipse), `Ctrl+D` (Eclipse (macOS)).

![Clone a row](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_clone_row.png)

2. Make your changes.

3. [(Optional) Submit and commit your changes to the database.](#submit_and_commit_your_changes_to_the_database)

Procedure: Paste CSV lines

In IntelliJ IDEA, you can directly paste multiple CSV lines into a table. The original lines will be split into columns in accordance with the commas. The content of CSV lines will replace that of table rows. If the table does not contain enough rows, new ones will be created.

1. Select the rows that you want to paste your CSV lines into.

Alternatively, select the table row that you want to paste the first line of your CSV lines into.

2. Press `Ctrl+V` (Windows), `⌘ V` (macOS), `⌘ V` (IntelliJ IDEA Classic (macOS)), `⌘ V` (macOS System Shortcuts), `Ctrl+V` (XWin), `Ctrl+V` (GNOME), `Ctrl+V` (KDE), `Shift+Insert` (Emacs), `Ctrl+Shift+V` (Sublime Text), `⌘ ⇧ V` (Sublime Text (macOS)), `Ctrl+V` (NetBeans), `Ctrl+V` (Visual Studio), `⌘ V` (Visual Studio (macOS)), `Ctrl+V` (Eclipse), `⌘ V` (Eclipse (macOS)). Alternatively, select Paste in the context menu.

3. [(Optional) Submit and commit your changes to the database.](#submit_and_commit_your_changes_to_the_database)

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_paste_csv_lines.mp4)

Procedure: Submit and commit your changes to the database

Depending on the current [transaction mode](configuring-database-connections.html#transaction-mode), you can submit and commit your changes to the database by doing one of the following:

1. Tx:Auto mode: click ![The Submit button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.submitDB.svg) Submit on the toolbar. The changes will be committed to the database automatically.

2. Tx:Manual mode: click ![The Submit button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.submitDB.svg) Submit to submit your changes and ![The Commit button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.commit.svg) Submit and Commit to commit the submitted changes to the database.

For more information about committing changes to the database, refer to  the [Submit changes to a database](submitting-and-reverting-changes.html) topic.

## Set the number of rows in the data editor

Procedure: Set a number of rows in the result set

* By default, when you issue a query, the number of returned rows is limited to 500. This limitation is introduced to avoid an overload (for example, when your `SELECT` statement returns one million rows).

To change this limit, open settings `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) and navigate to `Tools | Database | Data Editor and Viewer`. In the `Limitations | Limit page size to` field, specify a new number. To disable the limitation, clear the Limit page size to checkbox.

* Click the current row range in the grid pagination control and select the desired value from the Page Size list.

Procedure: Make all rows visible simultaneously

1. Open settings `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) and navigate to  `Tools | Database | Data Views`.

2. Clear the Limit page size to checkbox, and click OK.

3. Click ![the Refresh button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.refresh.svg) Refresh or press `Ctrl+F5` (Windows), `⌘ R` (macOS), `⌃ F5` (IntelliJ IDEA Classic (macOS)), `⌘ R` (macOS System Shortcuts), `Ctrl+F5` (XWin), `Ctrl+F5` (GNOME), `Ctrl+5` (KDE), `Ctrl+F5` (Emacs), `Ctrl+F5` (Sublime Text), `⌘ R` (Sublime Text (macOS)), `Ctrl+F5` (NetBeans), `Ctrl+Alt+R` (Visual Studio), `⌘ ⌥ R` (Visual Studio (macOS)), `Ctrl+F5` (Eclipse), `Ctrl+F5` (Eclipse (macOS)) to refresh the table view.

## Navigation between rows

This chapter describes how you can navigate between related rows of one or several tables. For example, you can use this functionality to navigate between tables by using primary or foreign keys.

Depending on the value of the [Limit
page size to](#making_all_rows_visible_proc) parameter, the result set might be divided into several pages. For example, you set the Limit page size to parameter to 100, but your query returned 200 rows. You will have two pages of rows, with 100 rows on each page.

Procedure: Navigate between subsets of rows

To navigate between pages, use the following controls:

* ![The first page icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.play_first.svg) First Page: Navigates to the first page of the result set.

* ![The previous page icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.play_back.svg) Previous Page: Navigates to the previous page of the result set.

Alternatively, press  `Ctrl+Alt+Up` (Windows), `⌘ ⌥ ↑` (macOS), `⌘ ⌥ ↑` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ↑` (macOS System Shortcuts), `Ctrl+Alt+Up` (XWin), `Ctrl+Alt+Up` (GNOME), `Ctrl+Alt+Up` (KDE), `Ctrl+Alt+Up` (Emacs), `Ctrl+Alt+Up` (Sublime Text), `⌘ ⌥ ↑` (Sublime Text (macOS)), `Ctrl+Alt+Up` (NetBeans), `Ctrl+Alt+Up` (Visual Studio), `⌘ ⌥ ↑` (Visual Studio (macOS)), `Ctrl+Alt+Up` (Eclipse), `⌘ ⌥ ↑` (Eclipse (macOS))  .

* ![The next page icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.play_forward.svg) Next Page: Navigates to the next page of the result set.

Alternatively, press `Ctrl+Alt+Down` (Windows), `⌘ ⌥ ↓` (macOS), `⌘ ⌥ ↓` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ↓` (macOS System Shortcuts), `Ctrl+Alt+Down` (XWin), `Ctrl+Alt+Down` (GNOME), `Ctrl+Alt+Down` (KDE), `Ctrl+Alt+Down` (Emacs), `Ctrl+Alt+Down` (Sublime Text), `⌘ ⌥ ↓` (Sublime Text (macOS)), `Ctrl+Alt+Down` (NetBeans), `Ctrl+Alt+Down` (Visual Studio), `⌘ ⌥ ↓` (Visual Studio (macOS)), `Ctrl+Alt+Down` (Eclipse), `⌘ ⌥ ↓` (Eclipse (macOS)) .

* ![Go to the last page icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.actions.play_last.svg) Last Page: Navigates to the last page of the result set.

![Grid pagination toolbar controls to navigate between subsets of rows](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_navigate_between_subsets_of_rows.png)

Procedure: Go to a specified row

* To navigate to a row with a specified number, right-click the table and select `Go To | Row…` `Ctrl+G` (Windows), `⌘ L` (macOS), `⌘ G` (IntelliJ IDEA Classic (macOS)), `⌘ L` (macOS System Shortcuts), `Ctrl+G` (XWin), `Ctrl+G` (GNOME), `Ctrl+G` (KDE), `Alt+G` (Emacs), `Ctrl+G` (Sublime Text), `⌃ G` (Sublime Text (macOS)), `Ctrl+G` (NetBeans), `Ctrl+G` (Visual Studio), `⌘ G` (Visual Studio (macOS)), `Ctrl+L` (Eclipse), `⌘ L` (Eclipse (macOS)). In the Go to Row dialog, specify the row number and click OK.

![Go to a specified row](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_go_to_specified_row.png)

Procedure: Navigate to an object DDL

* In the data editor, right-click a cell of the column whose DDL you want to open, and navigate to `Go To | DDL`.

Alternatively, open the Go to Action dialog by pressing `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)) and type `DDL`.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_navigate_to_object_ddl.mp4)

Procedure: Navigate between related rows

* Right-click a row or cell in a table and select `Go To | Related Rows`.

Alternatively, select a cell and click ![the Related Rows icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/database-plugin.icons.expui.goToTable.svg) Related Rows on the quick actions popup toolbar that appears.

![Referenced and referencing data](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_referencing_referenced_data.png)

In the data editor, you can select several values and navigate to the related data.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_navigate_between_referenced_referencing.mp4)

For more information about the action behavior options, refer to  [Advanced Settings](advanced-settings.html#related_rows_action_behavior).

> **Tip:**
> Also, you can watch [the Navigate by foreign keys video at youtube.com](https://www.youtube.com/watch?v=U5SOD-eeK50&t=1052s) for another example.

