Basic operation of SQLPlus

Today I learned about the Orcale database. Let’s learn and memorize the basic operating sentences.
First of all, I won’t talk about the installation. Just follow the Internet.
This article is all operations under the dom window

1. Log in

Enter SQLPlus in the dom window to enter the Oracle entry program

Insert picture description here

2. Enter

After entering the user name and password, you can enter the SQL statement.

Insert picture description here

3. Exit

quit exit

Insert picture description here

exit

Insert picture description here

Ctrl + z Exit

Insert picture description here


To be honest, I don't know why there are so many disconnect methods.

4. Switch users

1. View current users

show user;

Insert picture description here

2. Switch users

A total of four users were previously provided in Oracle. Switching between these four users can be done using the following syntax:

CONN username/password [AS SYSDBA]

For example:

Insert picture description here


Note:
If you are currently using the SYS account to log in, you must write "AS SYSDBA", and you can
use it after logging in. Example: Use sys to log in

CONN sys/change_on_install AS SYSDBA;
Insert picture description here

5. Invoke native commands

In sqlplus, you can directly call the native DOS commands, for example: copy command:
COPY source file path target file path

copy d:\my.txt d:\hello.txt
Insert picture description here

If you want to call it locally: add a HOST before it. Example: Invoke the copy command of the local machine

host copy d:\my.txt d:\hello.txt;

The above are just some of the most basic operation commands, and other commands will be exposed in the future.