title: MySQL - Create a view with manual cross join
body: <p>I am trying to create a view with cross join based on multiple if conditions.</p>
  <p>I know which column to join with which columns.</p>
  <blockquote>
  <p>1 in Table A with 1 &amp; 2 in Table B,</p>
  <p>2 in Table A with 1 &amp; 3 in Table B.</p>
  </blockquote>
  <p>I can do the same by creating a mapping table with this logic and use that for joining, but can it be done in the view definition itself, i.e. logic is in the view definition?</p>
  <p>Table A</p>
  <pre><code>ID | Animal
  1  | Man
  2  | Panda
  </code></pre>
  <p>Table B</p>
  <pre><code>ID | Fruit
  1  | Bananna
  2  | Apple
  3  | Bamboo
  </code></pre>
  <p>I want to have view as per known conditions expected would be like</p>
  <p>View</p>
  <pre><code>Man   | Bananna
  Man   | Apple
  Panda | Bananna
  Panda | Bamboo
  </code></pre>