Abstract: SQLPlus is an Oracle database interactive tool used to connect to the database and execute SQL statements. It can be started from the command line, and the command structure includes SQL statements, semicolons, and newlines. Basic command: CONNECT: connect to the database. DISCONNECT: Disconnect. SELECT: Query data. UPDATE: Update data. INSERT: Insert data. DELETE: delete data.
SQLPlus command usage
SQLPlus is an interactive tool provided by the Oracle database management system for connecting to the database and execute the SQL statement.
Start SQLPlus
Open a command line or terminal and type the following command:
<code>sqlplus username/password[@database]</code>
username
: database user Namepassword
: Database password@database
: Optional parameter, specify the database instance to be connectedSQLPlus command structure
SQLPlus command generally consists of the following parts:
Basic commands
Other common commands
Example
The following example shows how to perform basic operations using SQLPlus:
Connect to Database
<code>SQL> CONNECT user1/password@orcl</code>
Query data
<code>SQL> SELECT * FROM employees;</code>
Update data
<code>SQL> UPDATE employees SET salary = salary * 1.10 WHERE department_id = 10;</code>
Disconnect from the database
<code>SQL> DISCONNECT</code>
Note:
SQL>
is the prompt. The above is the detailed content of Usage of sqlplus command. For more information, please follow other related articles on the PHP Chinese website!