(c) Nigel Maddocks, 2007
Edit-DB ver 2.05.016, Doc ver 2.05.016
To display a list of Views for a particular database or schema (and owner depending on database type), select Views from Object type in the Object-type frame, having ensured that the other selections to the left, labelled Database or Schema (and Owner depending on database type), are completed.
Most of the functionality applicable to Tables also applies to Views. See the Tables section. Views may also have their records edited if a unique record identifier can be determined.
In addition to working with the contents of a View, its definition can be displayed too by clicking on the S (for Source) link next to the View name.
Oracle and MS SQL Server allow the View definition to be retrieved in the exact format in which it was originally defined. The example here is taken from MySQL, which re-writes the view definition before it is internally stored. The database developer originally did not write the apostrophe delimiters or the excessive apostrophes but did have line breaks to enhance readability.
The View can be deleted by pressing the Delete button and confirming.
The View can be edited by pressing the Edit button. In this example, the name of a column is changed.
On pressing Update the View definition is updated. The output records from the View can be displayed in the usual way by clicking on the View name in the Object-List frame. If the View update fails, then the error message from the database is displayed, and the view definition can be further modified.
Note: Oracle will often accept invalid object definitions and only present the problems when the object is used.
When displaying data in the multi record display, schema information is often cached in order to improve performance. If you are not seeing schema changes (as in this case, changing an output column name within a view), then press the button to refresh the schema cache.