Home > Database > Oracle > body text

How to modify the value of a field in oracle

WBOY
Release: 2022-01-05 14:50:25
Original
16392 people have browsed it

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

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

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!

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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!