Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Inner Join (simple join)

Chances are, you've already written an SQL statement that uses an inner join. It is the most common type of join. Inner joins return all rows from multiple tables where the join condition is met.

Syntax:

SELECT column_name(s) FROM table_name1 INNER JOIN table_name2 ON table_name1.column_name=table_name2.column_name -- for example: SELECT Person.LastName, Person.FirstName, Sales.OrderNo FROM Person INNER JOIN Sales ON Person.P_Id=Sales.P_Id ORDER BY Person.LastName

select .ename, s.design, s.salary, e.eid, e.phno from emptable e,shirish s where e.phno=s.ph_no SQL> / ENAME DESIGN SALARY EID PHNO ---------- ---------- ---------- ---- ---------arjun student 20000 103 9973385126 amir student 20000 106 9973385126 sahrukh manager 25000 107 665577889

You might also like