Sqlplus Formatting Query Results commands

Source: Internet
Author: User
Tags aliases

Column [Column Name|aliases|format] (columncan be reduced to writeCol)

1. When no arguments are followed , the current defined attribute is displayed

2. You can change the English column name to Chinese display by "column name alias "

3. Format

A.format ( format the specified column ( You can refer to the set instruction of the Sqlplus command ))

Col column name format you want

such as Col salary format $999,999,999.99 displays the Payroll column in $12,345.67 format

Col Salary Format $999,999,999.00 displays the Payroll column in the form $12,345.00

B.heading ( defining column headings , a Typical example is the effect of displaying column headings and aliases in Chinese format )

Col column name heading title

such as Col name heading name

The name is displayed as "name" when select name is from student

C.null ( replace null value with specified string )

Col column name null "string" no longer an example

D.on ( default ) |off ( The Set display property is working )

OFF all settings display properties do not work

on to display the display properties of the settings display

e.wrapped (wrapping by a specified length ) |word_wrapped ( wrapping by a full string )

Col column name wrapped|word_wrapped

Ttitleand theBtitle (output Query header and bottom text)

Ttitle|btitle [Printspec [text|variable] [On|off]

Printspec parameters are

1.COL Specifies the nth column of the current row to print

2.Skip jumps to the next row , the nth column prints , the default is 1

3.Left Align left to print

4.Center Center Print

5.Right Right-aligned printing

6.Bold blackbody Printing

text|variable Print text content or variable content

Off disables printing of titles

On allows printing of titles

Sqlplus Formatting Query Results commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.