Querying and updating tables and view

Depending on your access privileges, you can use the Database Navigator to:

Query

Query the contents of a table or view.

Insert

Insert a new row into a table or the base table for a view.

Update

Update a table or view base table row.

Delete

Delete a table or view base table row.

To query a table or view, you must have:

To insert a table or view row, you must have:

To update or delete a table or view row, you must have:

To query a table or view:

  1. In the Oracle Portal Navigator, navigate to the list of schemas.

  2. The Name column on the Database Objects tab contains a list of all schemas in the database on which you have View access privileges. In the Name column, scroll down to the schema containing the database object you want to find.

  3. Click the schema Name. The Name column updates with a list of objects stored in the schema you selected.

  4. Scroll down to the database object you want to find.

    Note To find an object, you can also enter the name of the database object in the Find field at the top of the page and click Go.

  5. The actions you can perform on an object display in the Actions column next to each object.

  6. In the Actions column, click Query Rows. A Query by Example report displays entry fields corresponding to the columns in the table or view.

  7. Enter query criteria in one or more of the table or view column entry fields.

    Note To view all rows in the table or view, leave all table column entry fields in the Query by Example report blank or deselected, leave Show selected for each row, then click Query.

  8. (Optional)Choose Order by and other query options on the Query by Example report. If you have a question about an option, click the small button to view help.

  9. Click Query. A page displays a report containing the columns you selected and all table rows matching your search criteria.

To insert a new table or view row:

  1. Follow steps 1-7 above.

  2. In the Actions column, click Modify Rows.

  3. A Query by Example report displays entry fields corresponding to the columns in the table or view.

  4. Enter the column values you want to add for the new table or view row. Columns that display in red text do not accept null values.

  5. Click Insert New Rows.

  6. A confirmation message at the top of the page indicates if you were successful.

To update a table or view row:

  1. Follow steps 1-7 above.

  2. In the Actions column, click Modify Rows. A Query by Example report displays entry fields corresponding to the columns in the table or view. Enter query criteria in one or more of the table or view column entry fields.

    Note To view all rows in the table or view, leave all table column entry fields in the Query by Example report blank or deselected, leave Show selected for each row, then click Query.

  3. (Optional) Specify Order by and other query options on the Query by Example report. If you have a question about an option, click the small button to view help.

  4. Click Query. A page displays a report containing the columns you selected and all table rows matching your search criteria. The follow example shows a section of the report that was generated by leaving column entry fields for the SCOTT.EMP table blank, leaving Show selected for each row, and clicking Query.

  5. Click Update next to the row you want to update. Another Query by Example report displays. For example, the follow report displays if you click next to EMPNO 7844.

     

  6. Update values in the column entry fields and click Update.

  7. A confirmation message at the top of the page indicates if you were successful.

To delete a table or view row

  1. Follow steps 1-5 above.

  2. Click Delete. A message asks you to confirm that you want to delete the row form the table or view.

  3. Click Yes.