0

I have 2 tables, one With a unique key the other With no unique key. In both tables there are one column "name" which are identical. I want to update table two With the unique key from table one where table.one.name = table.two.name. There are multi rows in table two, only one in table one.

Is this possible?

1 Answers1

0

In Oracle database is it possible with sql command:

update table2 a set a.col = :nValue 
where a.name = (select b.name from table1 b where b.name = a.name and b.key = :nUniqueKey)

In others databases it will be the similar.

ZephyCZ
  • 71
  • 4