3
是否有可能在MySQL中創建動態使用其他表中的表(動態使用其他表中的動作)(與在PHP中擴展類相同的想法)。例如:動態MySQL表
table1
table1_id
column1
column2
column3
table2
table2_id
column4
column5
所以,當我查詢表2我得到的所有列從表1 像:
SELECT table1_id,column1,column2,column3,table2_id,column4,column5 FROM table2;
你只想對這個數據集執行選擇嗎?另外,每個表格中是否有與其他表格相關的列? – Nick
http://dev.mysql.com/doc/refman/5.0/en/create-view.html您可能想要使用視圖 – Ignacio
進行調查根據需要的「動態」方式,創建和銷燬視圖可能不會是值得的。 JOIN可能會更好。 – Nick