Table of Contents
SQL Editor - Results Area Help
After you click “Execute” button in the SQL Editor, and the query is executed successfully, you will see the result tab, which shows records of the result cursor. This tab contains the start of the query as its name.
Grid with Records
The grid is very similar to the grid of Data Editor but it is not 100% the same because it shows records of a cursor (recordset) but not records of a single table. Cursor by default is read-only. The cursor also can be a join of a few tables or be the result of even more complex relational operations. You can turn the read-only mode off to edit the records, just like in the Data Editor.
You can move the mouse cursor over the column name to see a tooltip with information about this column.
Under the grid, you can see a small status bar with info about the result, read-only mode switch and a couple of buttons on the right side:
- ReadOnly - Turn ON/OFF read-only mode in the result grid. [Valentina Studio Pro]
When the read-only mode is off, the status bar is completed with a set of editing buttons:
- Apply Changes - applies all changes made to the result
- Discard Changes - discards all not applied changes
- Content Editor - shows extended editor for the cell value
- Set NULL - sets NULL value to the field if possible
- Autosize - apply auto-sizing option. The menu has available auto-sizing options
- Check Visible Rows - adjust the column widths to fit the text of visible rows
- Check All Rows - adjust the column widths to fit the text of all rows
- Don't Check Rows - don't adjust the column widths to text
- Wrap Values - turn ON/OFF the wrapping for cell values
- Export - shows the menu to export the result
Valentina Studio allows you to edit the result right in the grid. [Valentina Studio Pro]
After switching the read-only mode off editable columns change their color and the status bar is completed with buttons for editing.
Depending on the columns in the result set and the capabilities of the database engine and client, editing mode may be enabled for some fields but not available for others, they remain not editable. Usually, if the result contains the primary key field of the source table - all fields of this table become editable.
Result editing is available both for tables and views.
Edited values are marked with an italic font:
Each update operation is added to the console separately along with the errors that may appear during execution.
After the change has been applied it is shown as unmodified again.
SELECT * FROM actor
- All fields are editable - result contains “actor_id” field.
SELECT first_name, last_name FROM actor
- The fields are not editable - no primary key.