Induction of Oracle set and col commands

Source: Internet
Author: User

Today we want to tell you about the Oracle set and col commands. The Oracle Database's set is too fragmented. Here we will summarize it. The following is a detailed summary of its related content, if you are interested in related content, you can click to view the following articles.

SQL> set timing on; // set to display "time in use: XXXX"

SQL> set autotrace on-; // set to allow analysis of executed SQL statements

SQL> set trimout on; // Remove trailing spaces in each row of the standard output. The default value is off.

SQL> set trimspool on; // remove redirection spool) Output trailing spaces of each row. The default value is off.

SQL> set echo on // set whether to display the statement when running the command

SQL> set echo off; // displays each SQL command in the start script. The default value is on.

SQL> set feedback on; // The "XX rows selected" is displayed"

SQL> set feedback off; // display the number of records processed by this SQL command. The default value is on.

SQL> set colsep ''; // output delimiter

SQL> set heading off; // output domain title, on by default

SQL> set pagesize 0; // number of output lines per page. The default value is 24. To avoid paging, you can set the value to 0.

SQL> set linesize 80; // output the number of characters in a row. The default value is 80.

SQL> set numwidth 12; // The length of the output number field. The default value is 10.

SQL> set termout off; // displays the execution results of commands in the script. The default value is on.

SQL> set serveroutput on; // set to allow display of output similar to dbms_output

SQL> set verify off // you can close or open the prompt to confirm the display of information old 1 and new 1.

The column command

 
 
  1. COL[UMN] [{column | expr} [option...] ]  
  2. where option is one of the following clauses:  
  3. ALI[AS] alias  
  4. CLE[AR]  
  5. ENTMAP {ON|OFF}  
  6. FOLD_A[FTER]  
  7. FOLD_B[EFORE]  
  8. FOR[MAT] format  
  9. HEA[DING] text  
  10. JUS[TIFY] {L[EFT] | C[ENTER] | C[ENTRE] | R[IGHT]}  
  11. LIKE {expr | alias}  
  12. NEWL[INE]  
  13. NEW_V[ALUE] variable  
  14. NOPRI[NT] | PRI[NT]  
  15. NUL[L] text  
  16. OLD_V[ALUE] variable  
  17. ON|OFF  
  18. WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED]  

The following is an example:

 
 
  1. SQL> COLUMN SAL ALIAS Salary FORMAT $99,990.90 

We specify the MONEY display format of an individual name and number in the column SAL.

 
 
  1. SQL> col title format a20;  

The above content describes the Oracle set and col commands, hoping to help you in this regard.

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.