MySQL Forums
Forum List  »  Newbie

Re: Continous update of an inner joint table
Posted by: Phillip Ward
Date: August 07, 2017 04:41AM

Quote

I needed a table in my DB which combines two specific values from each tables which are related and I was able to create it wih an inner joint. The new table is exactly what I need ...

So you've taken values from TableA and TableB and used them to create TableC.

Then TableA and/or TableB change and you want the new values reflected into TableC?

Answer: Don't use TableC.

Instead, create a View (called, say, "ViewC") that executes the same SQL that you previously used to create TableC.

Your "data" in ViewC will now be updated in real time as TableA and/or TableB change. (Actually, there is no data in ViewC; it's just a Select statement with a Name). The actual data remains in TableA and TableB.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Continous update of an inner joint table
August 07, 2017 04:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.