MySQL Forums
Forum List  »  Merge Storage Engine

Find Underlying Table From Merge Table?
Posted by: Joel Lee
Date: March 06, 2006 12:00PM

Greetings-

I have a couple of simple questions regarding MERGE tables which I could not find answers for in the MySQL documentation.

1) When accessing a row from a MERGE table, is it possible to tell which underlying table the row was pulled from? Supposing that the primary/ID collumns of the underlying tables may overlap, just looking at an ID number won't work. For example:

Table_1 \
Table_2 | --> Table_All
Table_3 /

SELECT * FROM Table_ALL WHERE name = "Joe";

---
Results: 1 Row

ID name last_name date
156016 Joe Smith 2005-04-23
---

Is there any way I could tell which of the tables (Table_1, Table_2, or Table_3) the 1 resulting row came from in the above query? I'm really wanting to know if there is any information *in* the result somewhere that can be accessed to show which underlying table it came from.

2) If the answer to the above question is "no", are there any suggestions to solve this problem?


Thank you!

Joel



Edited 1 time(s). Last edit at 03/06/2006 12:03PM by Joel Lee.

Options: ReplyQuote


Subject
Views
Written By
Posted
Find Underlying Table From Merge Table?
8368
March 06, 2006 12:00PM


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.