Вы находитесь на странице: 1из 5

Cs403 Database

management
System
Assignment
Solution
Submitted By: Saad Ahmed
Student ID: BC140400781

INNER JOINT
Inner joint is used to combined similer
columns. For example, if we have two tables
A and B with columns A has C,D,E,F and B
has G,H,D,I wher D is a common attribute
between these two tables. To perform Inner
joint on tables we must have same domain
in these tables. When the joint operation
satisfied by matching Non-Null values for to
tables it combined them in resultant
column.The attributes in both tables are
generally tied in a primary foreign key but
this is not compulsory for this operation.

INNER JOINT EXAMPLE


Select * FROM Course c INNER JOIN
program p ON
c.prName = p.prName

OUTER JOINT
SQL supports variants joint operation
that rely on null values, These called
outer joins. Consider the two tables A
and C. In an outer join, on the other
hand,When first table value is not
matching with second table value it
appear exactly once in the result, with
the result columns inherited from the
table assigned null values.

OUTER JOINT EXAMPLE


Select * from COURSE c LEFT OUTER
JOIN
PROGRAM p on c.prName = p.prName

Вам также может понравиться