SQL Help - update query with two tables

Joseph Sinclair plug-discussion at stcaz.net
Fri May 23 19:09:22 MST 2008


What's the server (i.e. Oracle, MySQL, PostgreSQL, etc...)

Bryan O'Neal wrote:
> I have not done SQL by hand since sometime in 2005/2006 and I can not
> remember how to do a dynamic update using more then one table.
>  
> Let us say I have a table A and a table B and I want to update a record
> in table A for every record in table b base on information in table B.
> For example, let us say I want A.CURRENT_BALANCE to be set to
> A.CURRENT_BALANCE + B.DEPOSIT where A.ACCOUNT_ID = B.ACCOUNT_ID.
>  
> Thoughts?
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


More information about the PLUG-discuss mailing list