Home  >  Article  >  Database  >  What is the usage of oracle declare

What is the usage of oracle declare

青灯夜游
青灯夜游Original
2022-04-18 18:27:2910525browse

In Oracle, the declare command is used to delete one or more rows of data in a table. The syntax is "delete from table name [where condition];" statement; if the where clause is omitted, all data in the table can be deleted. Delete, if you add a where clause, delete one or more rows of data in the table based on conditions.

What is the usage of oracle declare

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

In Oracle, the declare command is used to delete one or more rows of data in a table

Syntax:

delete from 表名 [where 条件];
  • Table Name: Specify the name of the table to delete data.

  • WHERE clause: Optional. It means to define the deletion conditions for the deletion operation. If this clause is omitted, it means deleting all the data in the table (that is, clearing the data table).

Case 1. Delete the data of student "Zhang San" in the student information table (stuinfo):

delete  from stuinfo t where t.stuname='张三';

The results are as follows:

What is the usage of oracle declare

Case 2. Delete all data of student information backup table (stuinfo_2018):

delete  from stuinfo_2018;

What is the usage of oracle declare

## Recommended tutorial: "

Oracle tutorial

The above is the detailed content of What is the usage of oracle declare. 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