Is it possible in MySQL to create tables that use other column from another table dynamically (same idea as extending a class in PHP). Example:
table1
table1_id
column1
column2
column3
table2
table2_id
column4
column5
So when I query table2 I get all the columns from table1 like:
SELECT table1_id,column1,column2,column3,table2_id,column4,column5 FROM table2;
CREATE VIEW t2_view AS <SELECT stuff FROM t1,t2> (not sure exactly how you want to join t1 and t2)
SELECT * FROM t2_view;
Something like that is what you are looking for I think.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With