> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dbpilot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Data

## Insert

To insert a new row:

1. Right-click anywhere in the table view
2. Click the "New row" button

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/new-row.png" alt="New row" className="blog-image" />

A new row then appears at the bottom. Double-click a column to enter value for it,
or leave it blank to use the column's default value. The new row will be highlighted in green while it is not committed.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/new-row-step-2.png" alt="New row revealed" className="blog-image" />

## Update

To update a column's value, double-click the column. This will reveal an input field where you can enter a new value:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/update-value.png" alt="Update value" className="blog-image" />

Columns with uncommitted changes are highlighted in yellow:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/update-value-step-2.png" alt="Updated value highlighted" className="blog-image" />

## Delete

To mark a row for deletion:

1. Right-click the row
2. Click the "Delete row" button

Alternatively, select a row by left-clicking it, then **use the ⌫ (backspace)** [shortcut](./keyboard-shortcuts).

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/delete-row.png" alt="Delete row" className="blog-image" />

Rows marked for deletion are highlighted in red while the change is not committed:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/delete-row-step-2.png" alt="Row to be deleted is highlighted" className="blog-image" />

## Commit

Inserts, updates, and deletions are not executed immediately. You have to explicitly commit them to the database. To do so, either **use the ⌘S shortcut** or:

1. Right-click anywhere in the table view
2. Click the "Commit" button

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/commit.png" alt="Commit changes" className="blog-image" />

## Preview changes

To preview the exact SQL statements that will be executed when you [commit changes](#commit):

1. Right-click anywhere in the table view
2. Click the "Preview changes" button

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/preview-changes-step-1.png" alt="Preview changes button" className="blog-image" />

You will then see an overlay like this:

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/preview-changes-step-2.png" alt="Change preview" className="blog-image" />

## Discard changes

To discard all uncommitted changes of the selected database connection:

1. Right-click anywhere in the table view
2. Click the "Discard changes" button

<img src="https://mintlify.s3.us-west-1.amazonaws.com/dbpilot/resources/discard-changes.png" alt="Discard changes" className="blog-image" />
