Skip to Main Content

SQL & PL/SQL

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!

How to insert values into table after adding a new column to a table?

622404Mar 25 2008 — edited Mar 25 2008
Hello everyone,

Does anyone know what the sql statement is to insert values into a new column when the table has just been added with a new column? I have a table called "copy" and have several existing columns already. Thereafter, I've added a new column called "times" into this table using: alter table add times varchar(3)".

Now this column is empty and I want to insert values into this column based on a criteria, that is whichever rows that have a "shelfmark number" I want would have the value inserted. That is, if shelfmark 03-370 is in a row in the database, i hope to add a value to this row's times column:
insert into copy(times) values("3") where shelfmark='03-370';

But this is not possible because this is a wrong SQL. Does anyone have an idea what should my SQL look like? Any suggestion is welcomed.

Best regards,
Daniel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2008
Added on Mar 25 2008
3 comments
2,778 views