12-2. Obtaining Information About Tables

Problem

You are interested in learning more about a particular database table. You also want to look at system triggers and other privileged PL/SQL objects.

Solution

Use the Oracle SQL Developer navigator to select the table that you want to view information about, as demonstrated in Figure 12-3.

Image

Figure 12-3. Viewing table information

The editor window will then populate with a tab that consists of a worksheet and several subtabs. Each of these tabs provides different information about the table you are inspecting. Figure 12-4 shows the Columns tab of the Table Editor.

Image

Figure 12-4. Table Editor

How It Works

Oracle SQL Developer provides an excellent means for examining table metadata. When a table is selected within the database connection navigator, a worksheet becomes available that includes detailed information pertaining to the table characteristics and data. The first tab, which is labeled Columns, includes information about the table columns and each of their datatypes. This is most likely the tab that you will spend the most time in. It includes toolbar buttons that allow you to perform editing on the table and to refresh the table view in the editor, and it even includes an extensive table manipulation menu labeled Action that is a database administrator’s dream come true.

Next, the Data tab provides a live view of the data that exists within the table. It also includes toolbar buttons for inserting and deleting rows. This tab resembles a spreadsheet, and it allows different columns to be edited and then committed to the database. For a PL/SQL developer, it is most useful for editing data within a table that is being used for application debugging or testing purposes.

The Triggers tab will be useful to PL/SQL developers because it displays a selectable list of all table triggers. You can also create new triggers from the tab. Figure 12-5 shows the Triggers tab.

Image

Figure 12-5. Triggers tab of editor

When a trigger is selected on the Triggers tab, its DDL is displayed in a panel on the bottom half of the window. The green arrow button will allow the trigger to be executed, and the refresh specifies an interval of time. You will learn more about trigger development in Recipe 12-11.

Oracle SQL Developer provides very useful information regarding database tables for PL/SQL developers. It also provides convenient access for trigger development and manipulation.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.144.170