我有3個表彼此相關從其他表中獲取值插入相關的表中?
table1 (for insert)
*******************
id1 | lable | line1
table2
********************
id2 | id1 | id3
table3
*******************
id3 | line1
在SQL(MySQL的)如何編寫腳本,而不是做PHP腳本?
INSERT INTO table1 (id1,lable,line1) VALUES ($from_GET, $from_GET,How can I got from table3?);
感謝
不知道你是什麼意思。 你想從選擇中插入一個[插入](http://dev.mysql.com/doc/refman/5.0/en/insert-select.html)嗎? –