View Property Sheet Columns Tab

The Columns tab in a view property sheet displays the list of columns in the view. This list of columns reflects the SELECT orders from the queries of the current view. The only way to add or remove columns from this list is to modify the query of the view.

For more information on how to define the query of a view, see Creating, editing, and deleting queries associated with views.

If the View Was Created from One or Several Tables or Views

The name, code, description and data type of the view column are those of the corresponding column in the linked table or view.

If the View Is User-defined

It implies the view is not linked to another object. The name and code of the view column comes from the column name in the first query in the view definition. For example, MyView is defined by the following queries:

select Name, Comment
from Property
union
select Signature, Body
from Method

Only the two columns of the first query are used to create the corresponding view columns:



In this case, if you modify the view column code, the view creation script will reflect the change. In our example, if you rename Name in ClientName, the view creation script is the following:

create view MYVIEW (ClientName, "Comment") as
select Name, Comment
from Property

View Column Properties

When you select a column in the list of view columns and click the Properties tool in the toolbar, the view column property sheet is displayed. You can define the following properties from the view column property sheet:

Property

Description

Name

Specifies the name of the view column. This name is automatically calculated. If you choose to modify the default name, the User-defined button is selected and the Custom Name column displays the user-defined name. You can recover the default name by clicking again the User-defined button

Code

Specifies the code of the view column. The code is automatically calculated. If you choose to modify the default code, the User-defined button is selected and the Custom Code column displays the user-defined code. You can recover the default code by clicking again the User-defined button

Comment

Specifies the comment of the view column. This comment is automatically calculated from the column comment in the original table or view. If you choose to modify the default comment, the User-defined button is selected. You can recover the default comment by clicking again the User-defined button

Stereotype

View column stereotype

Data Type

View column data type. This data type is automatically calculated from the column data type in the original table or view. If you choose to modify the default data type, the User-defined button is selected. You can recover the default data type by clicking again the User-defined button

Length

Maximum length of the data type

Precision

Maximum number of places after the decimal point

You can also define notes and business rules on a view column.

User-defined Name or Code

You can modify the name and the code of a view column from the list. If you need to recover the name or code default value, you have to clear the corresponding cell in the list, the default name or code is automatically restored.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com