Get the App
SLTechnology News&Howtos  ›  Database  › 

How to create DDL and DML with sqlplus

Shulou Source: shulou.com Published: 2022-05-31 22:23:11 10月04日 Update

This article is about how to use sqlplus to create DDL and DML, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. Connect to the database

When window enters command-line mode, tap sqlplus will

Then perform the DDL operation of the table

For example:

DML operation: you can insert and update the data to the schema you just established.

Such as the insertion of data

**

What we should pay attention to here is:

**

If you make the following mistake first

Solution: put a semicolon at the end of each sentence

2 represents the second line.

The semicolon is the end in the sqlplus tool. If a semicolon is not written at the end of a sql statement, then sqlplus believes that the sql statement is not completed, and enter is a newline, then oracle automatically names the original line as the first line, and now edits as the second line, and if you enter a carriage return, there will be 3, and so on, until the semicolon appears.

Sqlplus is the most basic oracle database interaction tool, and other oracle interaction tools are developed on this basis. Sqlplus adheres to the strict sql specification, does not package any functions, and everything needs to be entered manually, so including semicolons that can be exempted from other tools, and so on, can also be fully entered in sqlplus.

The above is how to use sqlplus to create DDL and DML. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Tags: Semicolons data tools input basics databases more patterns knowledge articles statements utility and so on one line content functions commands that is work sessions manual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft OPPO Reno Shulou Technology Shulou Tech Info Docker