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.
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:
Case 2. Delete all data of student information backup table (stuinfo_2018):
delete from stuinfo_2018;## 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!