SQL plus for Oracle

Source: Internet
Author: User


The simple application of SQLPlus in Oracle is a command line execution tool provided by Oracle. After installation, SQLPlus is automatically registered in the system. After Oracle is installed, an emp table exists. Use SQLPlus to manipulate Oracle. Username: scott/tiger (enable service before use)
1. query all the contents of a table: [SQL] SELECT * FROM emp;

2. you can use sqlplus to set the environment: I. set the length of each line: www.2cto.com [SQL] set linesize; ii. modify the length of records displayed on each page: [SQL] set pagesize number of rows; 3. use the SQL file: @ + file path. 4. you can also use the connection of another user in sqlplus: [SQL] conn user name/password [AS <span style = "color: # ff9900; "> SYSDBA </span> | SYSOPER] * if you are connected to a super Administrator (sys), you must write as sysdba at the end of the concise statement. Log on as a system administrator. [SQL] conn sys/change_on_install as sysdba; * if you type again: [SQL] SELECT * FROM emp;
An error is reported because the database user does not have an emp table. To use a table across users, use the complete table name: "scott. emp "; www.2cto.com 5. display connected users: [SQL] show user; 6. display All forms of a Database: [SQL] SELECT * FROM tab; 7. view the table structure: [SQL] desc tablename;

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.