Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Insert & Update semantically

Richard DunneApr 16 2025

Insert means entering or putting something into

Update means changing something, changing an existing value

Insert should (only) be used to enter data into an empty or partially empty record/table

Update should (only) be used to change existing values in a record/table

SQL does not comply with this semantically or logically

When doing a partial insert into a 5 column table for example:

Insert into table (column1,column2,column3) values (value1,value2,value3)

This leaves 2 columns empty.

As stated above, Insert should (only) be used to enter data into an empty or partially empty record/table.

Insert into table (column4,column5) values (value4,value5) where column1 = value

Then update existing values as/when necessary.

Updating an empty column (field) should raise an error, IMO

SQL works, but semantically, Insert and Update are both implemented wrong. But who cares about semantics or logic as long as it works

Comments
Post Details
Added on Apr 16 2025
0 comments
40 views