Oracle The main users:
L Super admin: Sys
L General Administrator: System
L General Users: Scott
SQLPLUSW Some of the common commands :
L Set line Display quantity: Set linesize length
L settings also show quantity: Set pagesize length
L Ed and @ instructions
L Connection: Conn username/password as SYSDBA
If you forget the user password:
Win+r run cmd;
Run Sqlplus/nolog
Sql>connect/as SYSDBA
Sql>alter user Scott identified by Oracle123 (Modify password Oracle123 for Scott users)
Sql>alter user Scott account unlock (Scott users unlocked)
Query instructions:
Set the length of each line display:
Set the number of rows to display per page:
Connecting Users:
Conn username/password [as Sysdba|sysoper] |
For example, if you are connecting to a Super Administrator (SYS), you must write as SYSDBA at the end of the connection:
Conn Sys/change_on_install as Sysdba |
SYS user accesses the EMP table under the Scott User:
To query the currently connected User:
Get all the table names in a database:
To view the EMP table structure:
There are several main types of columns in the type:
Number (4): Represents the digit, the length is 4;
Number (7,2): represents numbers, where decimals account for 2 bits, integers are 5 bits, and total length is 7;
VARCHAR2 (10): Represents a string that can hold only 10 lengths;
Date: Represents the day;
You can enter a "/" in SQLPLUSW to represent the operation of repeating the previous statement.
Click "Yes".
Fill in the command in Notepad, save as *.sql
Commands can be executed by means of the @ file name, or by the @ path.
Note: If you do not enter the suffix name when executing the *.sql file, if it is txt you need to enter the suffix. txt.
Oracle primary users and some common commands