SQL*Plus User's Guide and Reference Release 8.1.5 A66736-01 |
|
Command Reference, 9 of 52
Specifies display characteristics for a given attribute of an Object Type column, such as format for NUMBER data.
Also lists the current display characteristics for a single attribute or all attributes.
ATTRIBUTE [type_name.attribute_name [option ...]]
where option represents one of the following clauses:
ALI[AS] alias CLE[AR] FOR[MAT] format LIKE {type_name.attribute_name|alias} ON|OFF
Enter ATTRIBUTE followed by type_name.attribute_name and no other clauses to list the current display characteristics for only the specified attribute. Enter ATTRIBUTE with no clauses to list all current attribute display characteristics.
Refer to the following list for a description of each term or clause:
type_name.attribute_name
Identifies the data item (typically the name of an attribute) within the set of attributes for a given object of Object Type, type_name.
If you select objects of the same Object Type, an ATTRIBUTE command for that type_name.attribute_name will apply to all such objects you reference in that session.
ALI[AS]
alias
CLE[AR]
FOR[MAT]
format
LIKE {
type_name.attribute_name
|
alias
}
|OFF
You can enter any number of ATTRIBUTE commands for one or more attributes. All attribute characteristics set for each attribute remain in effect for the remainder of the session, until you turn the attribute OFF, or until you use the CLEAR COLUMN command. Thus, the ATTRIBUTE commands you enter can control an attribute's display characteristics for multiple SQL SELECT commands.
When you enter multiple ATTRIBUTE commands for the same attribute, SQL*Plus applies their clauses collectively. If several ATTRIBUTE commands apply the same clause to the same attribute, the last one entered will control the output.
To make the ENAME attribute of the Object Type EMP_TYPE 20 characters wide, enter
SQL> ATTRIBUTE EMP_TYPE.ENAME FORMAT A20
To format the SAL attribute of the Object Type EMP_TYPE so that it shows millions of dollars, rounds to cents, uses commas to separate thousands, and displays $0.00 when a value is zero, enter
SQL> ATTRIBUTE EMP_TYPE.SAL FORMAT $9,999,990.99
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|