Java, Python, Database, Flutter, Matlap, Micorcontroller, Tutorials, Swing Framework

Hancie e-Learning Studio

Learn Java, Learn HTML, CSS, PHP, Javascript, Python Tutorials || Download program source codes || Java Project and Source code available here || All types error troubleshooting tips available here

How to perform an inner join in PL/SQL on two or more tables?

 


SELECT tbl_category.name, tbl_product.product_title
FROM tbl_product
INNER JOIN tbl_category ON tbl_category.category_id = tbl_product.category_id;

Another method

DECLARE
  CURSOR join_cursor IS
    SELECT tbl_category.name, tbl_product.product_title -- Selecting name from tbl_category and product_title from tbl_product tables
    FROM tbl_product
    INNER JOIN tbl_category ON tbl_category.category_id = tbl_product.category_id; -- Joining the tbl_category and tbl_product tables on category_id

BEGIN
  FOR join_record IN join_cursor LOOP -- Looping through each record fetched by the cursor
    DBMS_OUTPUT.PUT_LINE(join_record.name || ' ' || join_record.product_title); -- Printing the name and product_title of each record
  END LOOP;
END;
Welcome all to Hancie e-learning studio
Friends,
I have brought an e-learning platform for you from where you can teach internet, website, programming language, error troubleshooting, etc. Blogger, WordPress templates, themes are available for free on this website, which are not charged for downloading, so that you can earn money by blogging using such templates and this is not a difficult task and this You can do it now. You keep uploading new posts by us and keep taking advantage of this website. The aim of which is to spread the knowledge related to internet, career, web designing and technology to the people and contribute to the development of the country.