HI,

I'm looking for the best way, in Oracle 8i, to have the same behaviour than the following statement :

UPDATE T1
INNER JOIN T2 IN T1.ID=T2.ID
SET T1.COL1=T2.COL2

Ex : T1 has 10 rows (ID = 1 to 10) and T2 has 1 row (ID = 1)

Most of answers I red talk about :

UPDATE T1
SET (T1.COL1)=(SELECT T2.COL1 FROM T2 WHERE T1.ID=T2.ID)

I tried that on my 8.1.7.0 server, but I did'nt have the encoutered result. T1.COL1 was updated with T2.COL2 when ID=1, but the 9 others rows were updated with the null value ??????!!!!!!!

Someone wrote in the newsgroup :

UPDATE T1
SET (T1.COL1)=(SELECT T2.COL1 FROM T2 WHERE T1.ID=T2.ID)
WHERE EXISTS(SELECT 1 FROM T2 WHERE T1.ID=T2.ID)

That works, but I'm not sure that the best way !

Someone else wrote :

UPDATE (SELECT T1.COL1, T2.COL1
FROM T1, T2
WHERE T1.ID=T2.ID)
SET T1.COL1=T2.COL1

I'm not able to know what the best way to have the best perfomances and the right result.

Thank's for advance.

Etienne