Virajsinh

MySQL Left Join With WHERE Condition

Jan 5th, 2020
47
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     tbl_subcategory.category_id
  3. FROM
  4.     tbl_catalogue
  5. LEFT JOIN tbl_subcategory ON
  6.     tbl_catalogue.sub_category_id = tbl_subcategory.id
  7. LEFT JOIN tbl_category ON
  8.     tbl_subcategory.category_id = sub_category_id
  9.     WHERE tbl_catalogue.sub_category_id = 16
RAW Paste Data