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

What is the usage of oracle declare

青灯夜游
Release: 2022-04-18 18:27:45
Original
10573 people have browsed it

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 条件];
Copy after login
  • 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='张三';
Copy after login

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;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template