Updating Database Data

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Tutorials > "ZooDB" Database >

Updating Database Data

So far, you have learned how to create tables, insert data and execute queries to retrieve data from these tables. This section of the tutorial shows you how to update data contained in the tables of the Zoo database in the Result window of DatabaseSpy.

 

Objective

In this section of the tutorial, you will learn how to edit database data in the Result window of the SQL Editor. Specifically, you will learn how to do the following:

 

Update a data cell in the Result window
Delete record sets in the Result window
Copy a row of records and append it to the result grid as a new row

 

Commands used in this section

Icon

Command name

Description

ic_edit

Edit Data

This command is located in the context menu that opens when you right-click a table or column in the Online Browser; alternatively, you can also select the table and press Ctrl+Alt+E. Choose this command to generate an SQL SELECT statement that is automatically executed in the SQL Editor and switches the Result window into the Editing mode. This command works for all supported database kinds for both ADO and ODBC connections.

ic_commit

Commit

This command is available as a button in the Result window toolbar. Click this button to commit the changes you have made in the result grid to the database. The Commit button is only visible if the Result window is in the Editing mode.

ic_delete-row

Delete row

This command is available as a button in the Result window toolbar. Click this button to delete the row in which the cursor is currently located. Alternatively, you can also right-click a cell in the row to be deleted and choose Delete row from the context menu. The Delete row command is only available if the Result window is in the Editing mode.


Select row

The Selection command, which is located in the context menu that opens when right-clicking a cell in the result grid, opens a sub-menu from where you can choose the Row option. Use this command to select the entire row in which the cursor is currently located.

ic_copy

Copy selected cells

This command is located in the context menu that opens when right-clicking a cell in the result grid. Use this command to copy the content of the selected data cells to the clipboard.

ic_paste-as-new-rows

Paste as new rows

This command is available if the Result window is in the Editing mode and content has been copied to the clipboard beforehand. It is located in the context menu that opens when right-clicking anywhere in the Result window. Choose this command to append a new row to the result grid and automatically insert the clipboard content.


© 2019 Altova GmbH