Future Computer Technology

Future computer technology trends suggest that mankind has not even begun to tap into computational power and networking. In a few years, cloud computing will be so Old School. The PC will be what the mainframe is today. And, Web 5.0 will have finally kicked in for future computers.

How to Fetch Data By Joining 2 Or More Tables


To join multiple tables, we use JOIN keyword.
Example :

SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
INNER JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

Say if you want to join 3 tables, then the query will be :

SELECT c.cat_id, c.cat_name, s.subcat_name, p.prd_name, prd_price
FROM Category c
INNER JOIN Product p
ON p.prd_cid=c.cat_id
INNER JOIN Subcategory s
ON p.prd_sid=s.subcat_id



No comments:

Post a Comment