SQL* Plus CLI  «Prev 

Syntax for the COLUMN Command

Syntax for the COLUMN Command in Oracle

  1. COLUMN: This is the command, and it may be abbreviated to COL.
  2. name: Represents the column name from the SQL query.
  3. HEADING: The HEADING keyword introduces the text that you want to use for the column heading. The default is to use the column name. HEADING may be abbreviated to HEA.
  4. "text": Represents the heading text. Single quotes may be used instead of double. The quotes can be left off entirely if the heading is just one word, containing no special characters.
  5. FORMAT: Introduces the format specification that you want to use for the column. FORMAT may be abbreviated to FOR.
  6. spec: Represents the column's format specification. This is a string of characters that controls how the column's data are displayed on the report.
  7. TRUNCATED: Tells SQL*Plus to truncate column values in order to make them fit the display width.
    The abbreviation TRU may be used.
  8. WORD_WRAPPED: Tells SQL*Plus to display long values using multiple lines, and to word-wrap the lines. In other words, a line won't be broken in the middle of a word. The abbreviation WOR may be used for this.
  9. WRAPPED: Tells SQL*Plus to display long values using multiple lines, and to break each line exactly at the display width regardless of whether or not the line break occurs in the middle of a word. The abbreviation WRA may be used.
  10. JUSTIFY: The JUSTIFY clause controls the manner in which the column heading is aligned over the column. JUSTIFY may be abbreviated to JUS.
  11. justification: May be either RIGHT, LEFT, or CENTER. For text columns, the default is LEFT. For numeric columns it is RIGHT.