One: Medium size database
Two: Basic command connection Command 1, Conn[ect]
USAGE: Conn username/password @ network server name [as Sysdba/sysoper] when connected as a privileged user, you must bring as SYSDBA or as Sysoper
2, Disc[onnect]
Description: This command is used to disconnect from the current database
3, Passw[ord]
Note: This command is used to modify the user's password, and if you want to modify another user's password, you need to log in with Sys/system.
4. Show user
Description: Displays the current user name
5. Exit
Description: The command disconnects from the database and exits SQL * Plus
File Operations Command 1, start and @
Description: Run SQL script
Case:
SQL>@ d:\a.sql or SQL>start d:a.sql
2. Edit
Description: The command can edit the specified SQL script
Case:
SQL>edit D:\a.sql, this will open the D:\a.sql file
3, Spool
Note: This command can output the contents of the Sql*plus screen to the specified file.
Case:
SQL>spool d:\b.sql and enter SQL>off
Interactive commands 1, &
Note: You can override a variable, which needs to be entered by the user when it executes.
Select * where job='&job';
Displaying and setting environment variables
Overview: Can be used to control the output of various formats, set show if you want to permanently save the relevant settings, you can go to modify the Glogin.sql script
1, Linesize
Description: Sets the width of the display line, which is 80 characters by default
Show Linesize Set -
2\pagesize
Description: Sets the number of rows displayed per page, default is 14
Usage is the same as linesize.
The use of other environmental parameters is similar
Medium size databases and common commands for Oracle