Details Panel. Quest Software 8.5
Hirdetés
Hirdetés
Toad
Details Panel
The Tables details panel has tabs for displaying different details about the selected table.
Table - Columns
The Columns tab lists all the columns for the selected table. It also displays each column Data Type whether or not the column accepts Null values, column attributes (such as length, precision, scale), Default value, and column comments, if any. You can change the length, precision, scale display to
"NUMBER(10,5)" through the Toad Option | Schema Browser | Show
Column Length Info with Column Data Type setting.
The dropdown default is Show no comments. The other choices in the dropdown are Column Comments and Table Comments which show the comments in an overlay panel at the bottom of the details panel. You can type directly into this panel to edit the various comments. To save the comment edits, just select a different column or table.
Primary Key columns are indicated by PK column numbers in the PK column. A label to the right of the Add and Drop column buttons in the details panel displays the Primary Key column name(s).
You can multi-select columns, press <CTRL>C to create a comma-delimited list of columns to the windows clipboard and paste the selection into an editor.
190
Schema Browser
Table - Columns Details Panel Buttons
Click the Add Column button to display the Column Definition window. This dialog lets you add a column to the selected table. You must enter the Column
Name, the Type, and the Size. The Nullable radio button is selected by default.
If you want to see the resulting SQL script of your command, select the SQL tab.
To Add a Column
1.
Enter the column name, data type, and other appropriate information.
2.
Click the Execute button to add the column.
Character Default Values have to be wrapped within single quotes in order to make a valid "ALTER TABLE..." statement.
Additional columns are always appended to the end of the table definition.
The Drop Column button and the Drop Column from Table right-click menu item are enabled only if you have Oracle 8.1.5 or later.
The panel also contains a Clear Filter button. If it is red, a filter is active for the data grid, and you can click the Clear Filter button to clear the filter.
Table - Indexes
The Indexes tab lists the indexes for the selected table. The list includes the
Index Name, whether or not the index is Unique, the Column(s), and the
Position. It also lists the Parameters and Values for each index.
The Indexes details panel buttons include a Create script for selected index button and buttons that let you create, modify, rebuild, analyze, and drop indexes.
191
Toad
Table - Constraints
The Constraints tab lists any constraints for the selected table. It lists the
Constraint Name, the Constraint Type, the corresponding Column, and the
Position.
For foreign key referential integrity constraints, the panel at the bottom lists the owner, table, and column names that the foreign key constraint is pointing to.
The Table-Constraints details panel buttons let you enable/disable, rename, and drop constraints.
Table - Triggers
The Triggers tab lists any triggers for the selected table. It includes the Type,
Status, whether or not it's Enabled, the Trigger Event, the Trigger Owner, and the When Clause.
The editor at the bottom of the details panel lists the source code for the selected trigger.
The Table - Triggers details panel buttons let you enable/disable triggers, drop triggers, open a Procedure Editor window for the selected trigger, and compile.
Table - Data
The Data tab displays the selected table with data in grid format. This is similar to the SQL Results Grid on the SQL Edit window. The data in this grid is directly editable, because the query to populate the grid includes the ROWID column.
Grid configurations on this data tab are saved and restored from the Toad\User
Files folder structure.
You can easily rearrange columns by clicking and dragging on the column titles.
Double-click any data item to bring up a memo editor for that item.
Click on the book in the top left corner of the table to show single record views of the selected row.
192
Schema Browser
Table - Data Details Panel Buttons include:
The Filter Data toolbar button opens the Table Sort dialog where you can select the columns to sort and/or filter.
The View/Edit query button opens the View/Edit Schema Browser query window which lets you edit the query, check it to see if it parses ok, and implement it via the OK button.
Table Sort window
Sort Tab
To Sort, select the column(s) you want to sort and click on the pointing hand.
You can sort in ascending or descending order. You can move items up and down the list. If you want to clear the sort column(s) for this table, click the Clear Sort button. If you want to clear the entire filter for this table, click the Clear Filter button on the Table Sort dialog.
View/Edit Query button
Lets you change the query.
Filter Tab
You enter the filter criteria in the lower text panel.
The filter tab provides dropdowns with additional filter choices. On the filter tab, select the Column, Operator, and Value to filter upon. You can further edit the resulting SQL right in the memo editor widget.
When finished, click OK and the data in the grid will be sorted and/or filtered as specified.
The sort and filter criteria are saved in temporary files in the Toad\User Files folder hierarchy.
If a table filter is in effect, the funnel icon on the Data tab will be red.
The Clear Filters toolbar button clears the filter criteria and the sort criteria.
193
Toad
Data Details Panel buttons Continued
The forward and backward buttons let you quickly move around from row to row in the recordset. The First Record button takes you to the top of the grid (the first record in the recordset). The Next Record button takes you to the next record in the recordset, and so on.
See the Data Grids chapter for information on the Data Grids right-click menu.
Table - Scripts
The scripts tab displays the SQL script for the table you've selected. The scripts tab buttons include Copy Text to Clipboard and Select All Text.
The Copy Script to SQL Edit window opens a SQL Edit window and pastes a copy of the script into the window.
The tab includes options. When you change an option by either checking or unchecking it, the GO button turns red. This indicates that a change has taken place but is not yet reflected in the SQL script. The GO (Refresh the Table Script) button refreshes the script, updating any changes. Once you click GO the script refreshes implementing the options you've changed and GO returns to its original gray color.
Table - Grants
The Grants tab lets you view existing table grants and assign or replace existing privileges.
The Grants details buttons include Revoke Privilege, and Privileges which opens the Privileges window.
If you cannot see any roles, have your DBA Grant select on dba_roles to
schema.
To Add or Replace Privileges
1.
Select the table from the object list.
2.
Click the Privileges button. The privileges window for the selected table displays.
3.
Click in the cell of the privilege you wish to change. A dropdown displays.
4.
Select an item from the dropdown.
5.
Click Apply.
6.
A confirmation dialog will appear. Confirm by clicking OK.
194
Schema Browser
Table - Partitions
This lets you see partitioned columns and partitions for the selected table. The
Drop Partition button lets you drop partitions. The Truncate Partition button lets you truncate a selected partition.
Table - Subpartitions
This lists the subpartitioned columns. The display includes Subpartition Name,
Partition Name, Tablespace, Rows, and Blocks.
Table - Stats/Size
The Stats/Size tab displays numerous statistics and size information about the selected table.
The two display options Show Stats and Show Size/Extents are checked by default.
The Stats, such as TABLESPACE NAME and NUM ROWS, are displayed in the upper window of the details panel, and the Size/Extents information, such as
SIZE IN BYTES and INITIAL EXTENTS, are displayed in the lower window of the details panel.
The panel window columns are click and drag resizable, and a horizontal splitter is between them.
195
Toad
Table - Referential
The Referential tab displays a hierarchy of tables and how the selected table is referenced by other tables and references other tables. This display is based on the existing foreign key constraints from table to table.
Remember, "+" on the keyboard expands one branch of the hierarchy, and
<CTRL><SPACE> expands the whole tree. Pressing the asterisk key, "*" will fully expand the current node.
On each node of the hierarchy, there is a chain symbol for standard referential and a scissors symbol if the reference is Cascade on Delete.
Circular references, such as EMPLOYEE.MANAGER_ID referencing
EMPLOYEE.EMPLOYEE_ID, are captured; so you cannot drill down in the hierarchy endlessly (for example, emp_id is referenced by manager_id, which references emp_id, which references manager_id, and so on).
You can select an item in the list, press <F4> and get a popup window describing the object in detail.
Table -Used by
The Used By tab shows the objects that reference the selected table such as views, triggers, functions, procedures, and packages.
Here, the CUSTOMER table is selected in the objects panel. The Used By tab in the
details panel shows that the CUSTOMER table is used by the Demo.Sales view.
196
Letöltés
Hirdetés