GoConqr has a new look! Let us know what you think.

Quiz

SQL joins

jlangford 12 questions

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (12)

  1. 1A SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.
    1. ATrue
    2. BFalse
  2. 2The most common kind of SQL JOIN in an INNER JOIN.
    1. ATrue
    2. BFalse
  3. 3When two tables are joined, it it done by referring to their PRIMARY KEYS and FOREIGN KEYS
    1. ATrue
    2. BFalse
  4. 4When you call a JOIN statement, you must also include the following command after the second table is defined.

    FROM table_1 JOIN table_2 "----"
    1. AWITH
    2. BTOGETHER WITH
    3. CALONG WITH
    4. DON
  5. 5To join a movies table and a genres table based on the genres id, what syntax would you use?

    [blank_start]SELECT[blank_end] movies.title, genres.title
    [blank_start]FROM[blank_end] movies [blank_start]JOIN[blank_end] genres [blank_start]ON[blank_end] movies.genres_id [blank_start]=[blank_end] genres.id;
    1. ASELECT
    2. BFROM
    3. CJOIN
    4. DON
    5. E=
  6. 6It is possible to alter the names of the columns using the AS statement.

    SELECT movies.name AS movie, genres.name AS genre
    1. ATrue
    2. BFalse
  7. 7Is the following JOIN statement correct?

    SELECT movies.title AS movie, genres.name AS genre
    FROM movies JOIN genres ON movies.genre_id, genres.id LIMIT 10;
    1. ATrue
    2. BFalse
  8. 8If you wanted to add a more specific filter to the following JOIN statement, what command would you use?

    SELECT movies.title, genres.name
    FROM movies JOIN genres ON movies.genre_id = genres.id
    [blank_start]WHERE[blank_end] genres.name = 'Horror' LIMIT 10;
    1. AWHERE
  9. 9You are limited to only joining two tables
    1. ATrue
    2. BFalse
  10. 10To join more than one table you have to create another JOIN statement that refers back to the original table

    SELECT movies.title AS movie, genres.name AS genre, studios.name AS studio
    FROM movies
    JOIN genres ON movies.genre_id = genres.id
    JOIN studios ON movies.studio_id = studios.id
    LIMIT 10;
    1. ATrue
    2. BFalse

Information

Description
1 Web Development Quiz on SQL joins, created by jlangford on 05/06/2016.
Author
jlangford
Language
English
Views
0
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?