title: How to represent Cross Apply and Split String in MySQL
body: <p>For some background, what i'm trying to do create a database that contains multiple recipes. However, it's necessary for the individual ingredients to be linked to the recipe they originally came from.</p>
  
  <p>For instance, I have table containing all the individual ingredients. </p>
  
  <p><img src="https://i.stack.imgur.com/rLzId.png" alt="enter image description here"></p>
  
  <p>And a table where the recipes are stored, minus the ingredients.</p>
  
  <p><img src="https://i.stack.imgur.com/ki3UU.png" alt="enter image description here"></p>
  
  <p>Now, i've found <a href="http://www.kodyaz.com/articles//t-sql-convert-split-delimeted-string-as-rows-using-xml.aspx" rel="nofollow noreferrer">this</a> article which covers how to split strings using T-SQL XML Commands, and the code that is used to do so is:</p>
  
  <pre><code>SELECT
    Books.BookId,
    Books.Book,
    BookAuthors.AuthorId,
    BookAuthors.Author
  FROM Books
  CROSS APPLY dbo.split(Books.Authors,',') split
  INNER JOIN BookAuthors ON BookAuthors.AuthorId = split.val
  </code></pre>
  
  <p>The result i'm looking for would be very similar to this:
  <img src="https://i.stack.imgur.com/sXkhq.png" alt="enter image description here"></p>
  
  <p>However, CROSS APPLY etc only works on MS SQL Server and my question is:</p>
  
  <p><strong>Is it possible to achieve the same, or very similar effect using MySQL?</strong></p>
  
  <p>Thanks for any help.</p>