Oracle Self-Study notes (ii)

Source: Internet
Author: User

Common Sql*plus commands and environment variables

----------------------------------

query table Structure Command: describe (abbreviated DESC)

Set Display output width: Set line [size] {80|n}

List the statements for the SQL buffers: list (abbreviation L) after locating the error statement and modifying it, and then executing the correct statement/or run.

Delete command: Del

Change command: C/original/new body

Generate script: The Save command will deposit the contents of the SQL buffer into the specified file. You can use the GET command to load the contents of a script file into an SQL buffer, use the edit command to edit the script file, and execute the SQL buffer script with the @ or start command.

Spool command: Saves SQL statements and query results to the specified file or output to the printer, spool off | Out

-------------------------------------------------------------------------------------------

Setting environment variables for Sql*plus

You can use the show command to display the configuration of the Sql*plus environment variable, and you can set the environment variable using the value of the SET environment variable variable.

Common environment variables:

Set heading On|off: Whether column headings are displayed in the report

Set Linesize 80|n: Sets the number of characters per line

Set pagesize 24|n: Sets the number of rows to display per page

Set echo On|off

Set Feedback On|off

Set Long 80|n: Sets the maximum byte width for displaying long,clob and Ncolb values.

Format command: Column name format 999999 (representing six-digit number) |A9 (represents 9-character width)



Oracle Self-Study notes (ii)

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.