Edit data in the grid

When dbForge Studio for SQL Server executes any statement returning a result set, the retrieved data is displayed in Data Editor of the data view of the same SQL document. This topic shows how to edit the data in grid; for information about customizing data grid, as well as sorting, grouping and filtering, visit Viewing Data in Grid topic.

To edit data:

  1. In Data Editor, available in the Data view of the SQL document, click a cell you want to edit.

  2. After editing, confirm the changes by clicking the End Edit button under the grid or selecting the End Edit option from the shortcut menu. Tip: To discard changes, click the Cancel Edit button or select the Cancel Edit option from the shortcut menu.

In dbForge Studio for SQL Server, you can edit data directly in the data view immediately after retrieving it from a table or executing any query.

To retrieve data, select Retrieve Data from the shortcut menu of the table in Database Explorer. To make received data editable, you can also choose the table name from the Table drop-down list on the toolbar or leave it read-only by selecting (read-only).

Select Table

If you choose the read-only mode, you will gain in the performance aspect, as the application will work faster in this mode.

To edit data in the results of a join query, set the table you want to edit to editable mode, as described earlier. After you set one table as editable, the data from other tables in the results will appear in light gray.

Note

When you change the mode of any table from read-only to editable or vice versa, a balloon with the corresponding message is shown on the status bar.

Note

To view values of CHAR and VARCHAR fields you should take into account the following points:

  1. If a column type specifies a length of 200 or greater (length >= 200), buttons will appear in the grid. Click these buttons to open the editor in a separate window.
  2. If there are more than 4000 symbols in a cell, data can’t be edited directly in the cell. To edit data in such cells, you should click the […] button.

To insert, delete, copy, and paste data:

Use the shortcut menu or the corresponding buttons under the grid. For example, you can do the following:

  • To insert NULL (instead of an empty string), point to Set Value To in the shortcut menu and select NULL. You can also use the CTRL+0 key combination.
  • To insert a unique identifier, point to Set Value To in the shortcut menu and select Unique Identifier.

Note

Use the Set Value To menu to quickly set an empty string, zero, current date, or a unique identifier.

Set value

  • To add a new record, select the Append option from the shortcut menu or click the Append button under the grid. To delete a record from the grid, select the Delete option from the shortcut menu or click the ‘-‘ button under the grid or press CTRL+DEL keys.

  • To copy and paste cell values, use the corresponding options from the shortcut menu.

To select data:

You can easily select and copy the data just like cells in a spreadsheet. Do either of these actions:

  • Move the mouse pointer across the grid holding the left mouse button

  • Click the first cell of the data range, press SHIFT, and, holding the SHIFT key, click the last cell. A rectangular range of cells will be selected.

Tip: Using the CTRL key, you may include and exclude cells to selection. Any number of rows may be copied and pasted to some other application, for example, a spreadsheet, but when you paste data in the data grid, only the first row will be pasted.

Selecting data

Note

Some queries return read-only data, for example, queries with aggregate functions (count, avg etc.), or data, retrieved from non-updatable views. Such data can’t be edited. It is also impossible to edit the result of executing the script with several SELECT statements.

Row and cell indicators

When working with the grid, you’ll see special indicators next to the focused cell. These indicators reflect the current editing state.

Focused row

The row is focused.

Editing

The row is being edited.

Row edited

The row has been edited.

Incorrect value

Incorrect value was entered into a cell. You must either fix the value or press the ESCAPE key to cancel changes made to the cell.

Download dbForge Studio for SQL Server and try it absolutely free for 30 days!

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?