Viewing and Modifying Data in a Database Table
See Also
When a database is connected, you can view and modify the data contained in a table in the built-in graphical representation of the SQL Editor.
To view data in a table:
- In the Services window, expand the node for a connected database (
).
- Expand the Tables or Views node.
- Right-click the node of the table or view and choose View Data.
When you choose View Data, an SQL query to select all the data from the table is automatically generated in the upper pane of the SQL Editor.
A visual representation of the table and the data it contains is displayed in the lower pane of the SQL Editor.
You can use this GUI representation of the table to add, modify, and delete table data, for example:
- Insert new records. To add new records, click the Insert Records button (
). This opens the the Insert Records dialog window, in which you enter new records. You can click the Show SQL button in the Insert Records dialog window to view the SQL statement(s) that will be applied upon initiating the action. Click OK to add the new records to the database table.
- Modify records: To edit existing records, double-click a record in a table cell and modify its content. Modified entries are shown in green. Click the Commit Record button (
) to commit changes to the actual database. Similarly, click the Cancel Edits button (
) to cancel any edits you have made.
- Delete selected records. Select a row in the table and choose the Delete Selected Record button (
). You choose multiple rows simultaneously by holding Ctrl.
- Delete all records: To delete all records in a table, click the Truncate Table button (
).
If the displayed data needs to be resynchronized with the actual database, you can click the Refresh Records (
) button.
For more on using the SQL Editor, see Executing SQL Statements and Scripts.
- Each column node has the same View Data item in
its pop-up menu. This feature is similar to the feature for tables;
however, when you view tables, the SQL statement for viewing data fetches only
the one column rather than the entire set of columns that the IDE displays when
you choose View Data.
- See Also
- Browsing Database Structures
- Executing SQL Statements and Scripts
Legal Notices