Back to Tylogix Home Page

 

A Simple SQL Join Skill Test

 

Part 1: Questions

 

Let there be two files:

 

  1. TABLEA
  1. TABLEB

1

2

3

.

.

.

 

.

100

1

2

3

.

.

.

10

 

Using the keys above:

  1. TABLEA EXCEPTION JOIN TABLEB should yield how many rows?

 

  1. TABLEB EXCEPTION JOIN TABLEA should yield how many rows?

           

  1. TABLEA INNER JOIN TABLEB should yield how many rows?

 

  1. TABLEB INNER JOIN TABLEA should yield how many rows?

 

  1. TABLEA LEFT OUTER JOIN TABLEB should yield how many rows?

 

  1. TABLEA LEFT OUTER JOIN TABLEB should yield how many NULL values?

 

  1. TABLEB LEFT OUTER JOIN TABLEA should yield how many rows?

 

  1. 8. If TABLEA had a numeric key and TABLEB had numbers in a character field, is there a way to still do the join?

 

Expected answer: Yes, with a “CAST” operation.

 

Let there be two files:

 

PLANT_TABLE

ITEM_TABLE

1

2

3

.

.

.

10

123

456

789

 

  1. PLANT_TABLE CROSS JOIN ITEM_TABLE would yield how many rows?

 

Click Here to see the answers

 

Back to Tylogix Home Page