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;