Basic SqlPlus commands

Source: Internet
Author: User

Basic SqlPlus command instructions: www.2cto.com remark annotation set headsep title line feed ttitle setting output page header title btitle setting output page tail title column formatting SQL statement columns break on notification sqlplus insert a space in the output result. compute sum notifies sqlplus to calculate the subtotal set linesize (line) set pagesize set the maximum number of rows on the page set newpage set the number of empty rows between pages spool sqlplus screen file input and output command set pause sqlplus screen output results on the page pause and save to save the most recent SQL statement of the current session to the specified file. The host is returned to the operating system environment! Start or @ command edit in the execution file use the custom editor to edit the editor exit or quit in the Custom sqlplus in the define_editor specified file to exit sqlplus Column is the most practical command in sqlplus. this command is used to change the width and title of a column specified in the select statement because the width of the column output by the SQL statement is inappropriate. Most of the time, we can use column name as col to modify the column width in the following two ways: column c1 format a20 -- Adjust the column c1 character type display width to 20 characters column c1 format 9999999 -- adjust the maximum display width of the column c1num type to 7 characters and modify the column title column c1 heading c2 -- output the column name of c1 as c2 SQL> col file_name for a50; that is to say, the field file_name occupies 50 columns. If the actual value exceeds 50 columns, only new lines can be entered, for is actually the abbreviation of format. What does a mean? I have never understood it. SQL> set linesize 200 means that up to 200 columns can be displayed in the entire sqlplus display area, if you do not set the default value to show 80 columns of SQL> set linesize 100; set the Row Height to 100

Related Article

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.