Lesson 2: Viewing and editing database data

In this lesson, you will view and edit data in a database.

  1. If the Database Development perspective is already open, skip to step 2.

    If the Database Development perspective is not open, select Window|Open Perspective|Database Development from the main menu bar.

  2. If a connection to the MySybStore database is already established to the tutorial database, skip to step 3.

    If a connection is not established, right-click the MySybStore connection profile in the Database Explorer view and select Connect from the context menu.

  3. In the Database Explorer, expand the MySybStore/Tables folder.

    NoteTo browse the stored procedures defined in the database, expand other folders, such as Procedures & Functions.

  4. Right-click the store_shelf table and select Edit Data|Grid from the context menu.

    NoteIf a message appears stating that “the operation is configured to the Database Explorer perspective,” click OK.

    The contents of the table appear in the Results view.

  5. Select the Results tab, right-click a cell and select Insert Row from the context menu. A new empty row appears in the table.

  6. Click any cell in the Curr Qty column and change the quantity to 20 instead of 10.

  7. Right-click any cell in the table and select Retrieve from the context menu. The table information shown on the Results tab is refreshed.

    NoteTo save any changes, right-click in the Results tab and select Save from the context menu. If you make changes, but have not saved them, you can right-click and select Retrieve to undo your modifications and revert the display to the last-saved version of the table.

  8. Select Window|Close Perspective from the Sybase WorkSpace main menu to close the grid view of the store_shelf table without saving any of your changes. You have finished viewing and editing data in a database.