insert into table
LEFT JOIN `otherTable`
on otherTable.`field`='value'
AND otherTable.`otherfield`='anotherValue'(`column`,`column`,`column`)VALUES('data',otherTable.`data`,'anotherValue')
I know this does not work, but you can see the logic i am trying to achieve... but I was wondering if there is a simple way to do this..I know of many ways (selecting the data first, nested select statement and so forth) but while writing a new script I thought hmm there has to be an easier cleaner way to do this.... so I thought I would ask neowin for future reference
Question
Original Poster
hello I want a simple way of writing this >>
I know this does not work, but you can see the logic i am trying to achieve... but I was wondering if there is a simple way to do this..I know of many ways (selecting the data first, nested select statement and so forth) but while writing a new script I thought hmm there has to be an easier cleaner way to do this.... so I thought I would ask neowin for future reference
Link to comment
https://www.neowin.net/forum/topic/1233693-mysql-insert-join/Share on other sites
2 answers to this question
Recommended Posts