Home > Blockchain >  Inserting Values Into Table Oracle SQL Not Working
Inserting Values Into Table Oracle SQL Not Working

Time:04-12

I have a few lines that have worked in the past for inserting new values into an existing table.

INSERT INTO TABLE_NAME (OLD_NAME, NEW_NAME, COUNTED, ORIGIN)
VALUES ('old name', 'new name', null , null)

When executing this code it replies with

1 row inserted in 0.008 seconds

but when I check the actual table I see that the table hasn't been updated. I have tried multiple times, placing every piece of data in a line of its own. After checking I found out that the lines are indeed inserted into the table only not showing up when the whole table is queried, but showing up when counting lines.

Also, maybe important, the last two columns don't need information so they are null and the name columns are in a language written from right to left instead of being from left to right.

CodePudding user response:

Any command that updates the table or enters new data must be committed. Did you use the comet command in Oracle after executing the insert command? You can try this command after insert query:

COMMIT WORK;

  • Related