Home » SQL & PL/SQL » SQL & PL/SQL » Re: urgent..urgent..how do i update the statement which uses 2 tables
Re: urgent..urgent..how do i update the statement which uses 2 tables [message #19287] Fri, 08 March 2002 06:17
Greg simpson
Messages: 1
Registered: March 2002
Junior Member
If I am correct, this will update the column for every row on the table. Do you know how to do it for a specific row. ie 2 tables are identical in format but not in data content.

Say they have a key column and a data column. Wish to apply the changes to the data column on the first table from the data column on the second table where the key fields are equal. I believe to do this you will have to pass both the Key Column and the data column out of the correlated subselect. Then also include the Key column on the where clause of the update, as opposed to only on the correlated sub select.

Is my assumption correct assuming the tables looked as below

Table1

K1 --- D1
1 ----- A
2 ----- B
3 ----- C
5 ----- D

Table2

K1 --- D1
1 ----- C
2 ----- B
3 ----- A
6 ----- G
Previous Topic: How can I made db server response quickly?
Next Topic: define editor command
Goto Forum:
  


Current Time: Wed Oct 27 04:19:18 CDT 2021