, . , Select.
, . , ( ) , , , - , . , , /, , . :
Person – , .
, .
, , :
- Inner Join.
- Left Join , , Left Outer Join.
- Cross Join.
- Full Join.
, SQL - Inner Join. :
Select * from Person Inner join Subdivision on Su_Person = Pe_ID |
SQL Join Inner Join , , , , , .
, Union, Union All.
, .
Inner Join
SQL Inner Join. Inner Join SQL , . , . , .
, SQL Inner Join, :
, , . , . , . , , . , ( ), .
Inner Join
, Inner Join, , . , SQL-, :
- Inner Join [ ] on [ , ] = [ ].
. , , , Person Subdivision . , SQL Inner Join, .
Person, , . , – Pe_ID. .
Subdivision , . , , Su_Person Person. ? , «» , . Inner Join.
SQL Inner Join ( ). , :
Select * from Person Inner join Subdivision on Su_Person = Pe_ID |
SQL Inner Join, , . . , Depart, . . , , .
. :
Select Pe_ID, Pe_Name, Su_Id, Su_Name, Dep_ID, Dep_Name from Person Inner join Subdivision on Su_Person = Pe_ID Inner join Depart on Su_Depart = Dep_ID and Pe_Depart = Dep_ID |
– , , . , , .
Select Pe_ID, Pe_Name, Su_Id, Su_Name, Dep_ID, Dep_Name from Person Inner join Subdivision on Su_Person = Pe_ID Inner join (Select Dep_ID, Dep_Name, Pe_Depart from Depart) as T on Su_Depart = Dep_ID and Pe_Depart = Dep_ID |
, . , ( ), .
Inner Join
, . SQL Inner Join . , . ( Inner Join SQL). - 3 - .
( ) .
Inner Join , , , .
: - , , , , , .