title: How to join two tables in SQL?
body: <p>I have two tables category &amp; sub_category</p>
  
  <p>category > cat_id, category_name, cat_status</p>
  
  <p>sub_category > sub_cat_id, cat_name, sub_cat_name, sub_cat_status</p>
  
  <p>I want to show all the columns from both tables. I have tried some joins but I am unable to do it. Here is my latest query:</p>
  
  <pre><code>SELECT category.category_name, category.cat_status
  from category full OUTER join sub_category on category.category,
      category.cat_status, sub_category.cat_name,
      sub_category.sub_cat_name, sub_category.sub_cat_status
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OUTER join sub_category on category.category, category.cat_status , sub_categor' at line 3</p>
  </blockquote>