DB Query Examples

UNION ALL: there is restriction for set

operators, i.e. the columns in query 1 must match the columns in query2 in data type,order and number.

some e.g.:
display those who are emp as well managers(INTERSECT)
display those who are not managers (MINUS)
display those depts which do not have emp(MINUS)
dispaly those depts which have emp(INTERSECT) try these……

OUTER-JOIN: used on those tables that keep common columns just like EQUI-JION. but, the o/p will display some extra information which is available in only one of the two tables……

display emp details along with coressponding department details and also display that department details which there are no emp….

than q


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s