Watch Our YouTube Channel
It is currently Wed Jan 24, 2018 3:14 am
 

All times are UTC



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jun 29, 2016 7:14 am 
Offline

Joined: Fri Nov 13, 2015 3:56 am
Posts: 460
Difference between inner join and intersect:
They are not the same but you can get the same result.
Intersect:
It is a not a join statement

Intersect does all columns.

When using INTERSECT operator the number and the order of the columns must be the same in all queries as well data type must be compatible.

It displays the values in the all columns included which are common in all the statements used in an intersect statement.

INTERSECT operator returns almost same results as INNER JOIN clause many times.

It should include same number of columns with corresponding data type in all the statements.

Use an intersect operator to returns rows that are in common between two tables; it returns unique rows from both the left and right query.

This query is useful when you want to find results that are in common between two queries.

INTERSECT operator is used to retrieve the common records from both the left and the right query of the Intersect Operator.

INTERSECT does all columns, INNER JOIN only the specified columns.

Also INTERSECT creates a temporary table and INNER JOIN works on the actual table.

Inner Join:
It is a join statement
Inner join only the specified columns.

An INNER JOIN is a JOIN operation that allows you to specify an explicit join clause.

An inner join attempts to match up the two tables based on the criteria you specify in the query, and only returns the rows that match.

Any of the columns among the tables can be used in select clause

If a row from the first table in the join matches two rows in the second table, then two rows will be returned in the results.

It is used to display columns from all the tables involved based on the common columns present in them which matches a certain condition.

_________________
Learn Web Development | Latest Technology News |Motivational Quotes


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 08, 2016 6:20 am 
Offline

Joined: Wed Jul 01, 2015 11:28 am
Posts: 172
Location: Bangalore
Inner join: 1. It is a join statement
2. It is used to display columns from all the tables involved based on the common columns present in them which matches a certain condition.
3. Any of the columns among the tables can be used in select clause

Intersect: 1. It is a not a join statement
2. It displays the values in the all columns included which are common in all the statements used in an intersect statement.
3. It should include same number of columns with corresponding data type in all the statements.

_________________
Digital Marketing Company in India| Web Design Company in India | SEO Services in India


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron