Sql*Plus User’s Guide and Reference


Copying Column Display Attributes


Download 5.34 Mb.
Pdf ko'rish
bet83/103
Sana04.08.2023
Hajmi5.34 Mb.
#1665146
1   ...   79   80   81   82   83   84   85   86   ...   103
Bog'liq
E18404-12

Copying Column Display Attributes
When you want to give more than one column the same display attributes, you can 
reduce the length of the commands you must enter by using the LIKE clause of the 
COLUMN command. The LIKE clause tells SQL*Plus to copy the display attributes of 
a previously defined column to the new column, except for changes made by other 
clauses in the same command.
Example 6–7
Copying a Column's Display Attributes
To give the column COMMISSION_PCT the same display attributes you gave to 
SALARY, but to specify a different heading, enter the following command:
COLUMN COMMISSION_PCT LIKE SALARY HEADING BONUS
Rerun the query:
/
Listing and Resetting Column Display Attributes
To list the current display attributes for a given column, use the COLUMN command 
followed by the column name only, as shown:
COLUMN 
column_name
To list the current display attributes for all columns, enter the COLUMN command 
with no column names or clauses after it:
COLUMN
To reset the display attributes for a column to their default values, use the CLEAR 
clause of the COLUMN command as shown:
COLUMN 
column_name
CLEAR
Example 6–8
Resetting Column Display Attributes to their Defaults
To reset all column display attributes to their default values, enter:
CLEAR COLUMNS
LAST MONTHLY
NAME SALARY BONUS
---------- -------- --------
Russell $14,000 $0
Partners $13,500 $0
Errazuriz $12,000 $0
Cambrault $11,000 $0
Zlotkey $10,500 $0
columns cleared


Formatting Columns
6-8
SQL*Plus User's Guide and Reference
Suppressing and Restoring Column Display Attributes
You can suppress and restore the display attributes you have given a specific column. 
To suppress a column's display attributes, enter a COLUMN command in the 
following form:
COLUMN 
column_name
OFF
OFF tells SQL*Plus to use the default display attributes for the column, but does not 
remove the attributes you have defined through the COLUMN command. To restore 
the attributes you defined through COLUMN, use the ON clause:
COLUMN 
column_name
ON

Download 5.34 Mb.

Do'stlaringiz bilan baham:
1   ...   79   80   81   82   83   84   85   86   ...   103




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling