Home » SQL & PL/SQL » SQL & PL/SQL » Select in Set statement in update
Select in Set statement in update [message #1674] Tue, 21 May 2002 14:45 Go to next message
jeff g
Messages: 5
Registered: June 2001
Junior Member
I have a table that I would like to change the name of a record with the following update. I don't believe it is possible since more then one row gets returned by the query. Is this going to have to be done in pl/sql?

update table1
set column1 = (select 'Supplier Firm'||column2 from table1 where column2 = 594549)
where colmun2 = 594549
Re: Select in Set statement in update [message #1675 is a reply to message #1674] Tue, 21 May 2002 16:33 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Since your selecting from the same table you are updating, wouldn't this be more straightforward as:

update table1
   set column1 = 'Supplier Firm' || column2
 where column2 = 594549;
Previous Topic: Seperate the values in a Column
Next Topic: Inserting data using a trigger
Goto Forum:
  


Current Time: Fri May 10 07:50:12 CDT 2024