Home » SQL & PL/SQL » SQL & PL/SQL » How to update a table based on other table field value?
How to update a table based on other table field value? [message #277640] Wed, 31 October 2007 01:07 Go to next message
fortunethiyagu
Messages: 94
Registered: December 2006
Member

Hi,

I am having two tables as mentioned below(sampx, sampy).


sampx
-------

A B
--- ---
1 2
3 4


sampy
-------

C D
--- ---
1 7
3 8
5 8

In a single update statement i want to update sampx table by having following condition.

If sampx.A = sampy.C update
sampx.B = sampy.D

Can you send me the query please...
Re: How to update a table based on other table field value? [message #277643 is a reply to message #277640] Wed, 31 October 2007 01:16 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
which of the above have you complied with?
Re: How to update a table based on other table field value? [message #277657 is a reply to message #277640] Wed, 31 October 2007 01:44 Go to previous messageGo to next message
Arju
Messages: 1554
Registered: June 2007
Location: Dhaka,Bangladesh. Mobile:...
Senior Member

Look at it,
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10007.htm#sthref9987
icon10.gif  Re: How to update a table based on other table field value? [message #277682 is a reply to message #277657] Wed, 31 October 2007 03:13 Go to previous message
fortunethiyagu
Messages: 94
Registered: December 2006
Member

Thanks yaar..
Previous Topic: to find out largest table in particular user
Next Topic: utl_file.fopen
Goto Forum:
  


Current Time: Sun Dec 11 07:58:33 CST 2016

Total time taken to generate the page: 0.12579 seconds