Home >Database >Oracle >How to delete data records in oracle

How to delete data records in oracle

WBOY
WBOYOriginal
2022-01-26 14:54:3014572browse

In Oracle, you can use the DELETE statement to delete data records. The function of this statement is to delete a specified row of data records. Using DELETE only deletes records without affecting the structure. The syntax is "DELETE FROM table name WHERE Primary Key Field = Record to be deleted".

How to delete data records in oracle

The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.

How to delete data records in oracle

If you want to delete data records in oracle, you can use the DELETE statement.

The example is as follows:

Delete records through [DELETE FROM table name WHERE column name = value].

For example

DELETE FROM Person WHERE LastName = &#39;Wilson&#39; and rownum<=1;

Delete one of the records in the person table where the value of the LastName column is equal to Wilson

DELETE FROM tab WHERE primary key field = field to be deleted

DELETE only deletes records without affecting the structure

Recommended tutorial: "Oracle Video Tutorial"

The above is the detailed content of How to delete data records in oracle. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn