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!

If data exist update else insert new record

589855Feb 11 2008 — edited Aug 9 2010
Hi :

I have created a table like this

create table PS (
pro.project_name varchar2(200),
hours number
)


i need to insert data like this if the project_name is already in the table update the row else insert a new row into the table how to write a query please suggest

i tryed many ways but both are not happening like this can any one please suggest

insert into table PS (pro.project_name, hours) values ( :p10_projects, :p10_hours)

// the above is the insert condition wht i have with the bind variables


Thanks
Sudhir
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2010
Added on Feb 11 2008
9 comments
9,784 views