ATTRIBUTE

The ATTRIBUTE command is used to format attributes of an Oracle8 object type. It functions like the COLUMN command, but with fewer parameters. Chapter 4 talks about this command.

ATTRIBUTE [object_type.attribute|attribute_alias 
                      [ALI[AS] alias|
                      CLE[AR]|
                      FOR[MAT] format_spec|
                      LIKE source_attribute|
                      ON|
                      OFF...]]

where:

ATTRIBUTE

Is the command. Issuing the ATTRIBUTE command with no parameters gets you a list of all current attribute settings.

object_type

Is the name of an Oracle8 object type.

attribute

Is the name of an attribute of the specified object type, and is the attribute you are formatting. If you stop here and don’t supply any other parameters, the current display settings for this attribute are shown.

ALI[AS] alias

May be abbreviated ALI. ALIAS allows you to specify an alternate name for this attribute that is meaningful to SQL*Plus.

alias

Is an alternate name for the attribute that may be used in other ATTRIBUTE commands, in place of having to spell out the full object type and attribute name again.

CLE[AR]

May be abbreviated to CLE. CLEAR erases any format settings for the attribute in question. This puts things back the way they were before any ATTRIBUTE commands were issued for the attribute.

FOR[MAT]

May be abbreviated to FOR, and allows you to control how the data for the attribute is displayed. For text fields, the format controls the maximum display length. For numeric fields, you can control the width, placement of commas, placement of the dollar sign, and so on. ...

Get Oracle SQL*Plus: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.