SQL * Plus basic usage

Source: Internet
Author: User

1. Connection

(1) Conn username/password @ Instance name/× execute in sqlplus */

(2) sqlplus user name/password @ Instance name/* shell execution */

2. append text

Append text;
/* After append, there are two spaces. Text is used to append the huge text. After you press enter, enter "/" and press enter to run it */

3. Add text

Input
/* Append multiple rows after the current row */

Input text
/* Append a row after the current row */

4. Replace text

Change/old text/New Text
/* Replace "just text" with "new text "*/

Change/Text
/* Delete "text "*/

5. delete text

Del
/* Delete the current row */

Del n
/* Delete row N */

Del n *
/* Delete row N */

6. Clear the buffer

Clear Buffer

7. display the Buffer Zone

List

List n

List n last
/* Display row n to the last line */

8. Save

Ed /* Save using notepad */

Save File
/* Save the operation to file */

Spool file

Spool off
/* The preceding two statements are used to save the query result to file */

9. query result formatting

Set pagesize n
/* Set the number of lines displayed per page */

Set Newpage n
/* Set blank lines between two pages */

Set linesize n
/* Set the number of characters displayed per line */

Show pagesize

Show Newpage

Show linesize

10. Call external scripts

@ Filename

Zookeeper -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

View triggers

Select object_name from user_objects;

View trigger content

Select * From user_source where name = 'readerinfo2 _ ddl_tgr 'order by line;

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.