Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table intersection?

Status
Not open for further replies.

SMAlvarez

Programmer
Dec 4, 2005
27
0
0
US
Hey,

Let's say we have two table both the fields "first name", "last name", and "address".

Which of these fields intersect? I mean don't all three intersect since there common to both tables? Or is this some special property for two tables to intersect other then them having the same field? Thanks.
 
the intersection of the two tables consists of those rows which have the same values in corresponding columns

you can obtain the intersection using the INTERSECT operator, but, in practice, not all database systems support this operator, so you can achieve the same results with an inner join

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
u had 3 join attributes...
u should write an inner join for all these 3 colums...


if u have primary key in 1 table and forign key in another table...u can simply applyinner join on key column only.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top