0% found this document useful (0 votes)
85 views1 page

Simple Join or Inner Join

An inner join returns rows from two or more tables where the join condition is met, matching column values between the tables. It is the most common type of join. An example shows selecting columns from a Person and Sales table where the Person ID column matches between the tables, and another example shows selecting columns from two tables where the phone number columns match to join the rows.

Uploaded by

ali khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views1 page

Simple Join or Inner Join

An inner join returns rows from two or more tables where the join condition is met, matching column values between the tables. It is the most common type of join. An example shows selecting columns from a Person and Sales table where the Person ID column matches between the tables, and another example shows selecting columns from two tables where the phone number columns match to join the rows.

Uploaded by

ali khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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