I have two SELECT query which are written in MySQL
$sql = 'SELECT Name FROM category WHERE CategoryID = '.$id;
AND
$sql = "SELECT * FROM sub_category WHERE ParentID = $id ORDER BY OrderIndex";
So far I have to translate these two query to Oracle PL/SQL
‚I came in idea to combine these two statment into one and so far I write query but I am a little bit confusing since I am begginer in PL/SQL
SELECT
c.Name,
sc.Name as SubCategoryName,
sc.ID as SubCategoryID,
sc.Picture as Picture,
sc.OrderIndex
FROM Category c
INNER JOIN sub_category sc ON ParentID =
WHERE CategoryID = 23;
Here is graphical representation of tables
CategoryTable
SubcategoryTable