Home  >  Article  >  Database  >  How to modify the value of a field in oracle

How to modify the value of a field in oracle

WBOY
WBOYOriginal
2022-01-05 14:50:2516573browse

In Oracle, you can use the update command to modify the value of the field. This command is used to update the data of the table. After the update statement is executed, it must be submitted by commit, otherwise it will only be valid in the current session. The syntax is " update table name set field = 'value' where condition".

How to modify the value of a field in oracle

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

How does oracle modify the value of a field

You need to use the update statement to modify it.

Basic syntax of the update statement:

update 表名 set 字段='值' where 条件;

For example, there is the following data in the test table:

How to modify the value of a field in oracle

Now we need to add the item with ID=3 To change the NAME of the data to badkano, you can use the following statement:

update test set NAME='badkano' where ID=3;
commit;

Result after execution:

How to modify the value of a field in oracle

Description:

After the update statement is executed , must be submitted by commit, otherwise it will only be valid in the current session.

Recommended tutorial: "Oracle Tutorial"

The above is the detailed content of How to modify the value of a field 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