Quiz
SQL joins
Este quiz tem tipos de pergunta que abrem no player de sempre.
Perguntas do quiz (12)
1A SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.
- AVerdadeiro
- BFalso
2The most common kind of SQL JOIN in an INNER JOIN.
- AVerdadeiro
- BFalso
3When two tables are joined, it it done by referring to their PRIMARY KEYS and FOREIGN KEYS
- AVerdadeiro
- BFalso
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 "----"- AWITH
- BTOGETHER WITH
- CALONG WITH
- DON
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;- ASELECT
- BFROM
- CJOIN
- DON
- E=
6It is possible to alter the names of the columns using the AS statement.
SELECT movies.name AS movie, genres.name AS genre- AVerdadeiro
- BFalso
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;- AVerdadeiro
- BFalso
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;- AWHERE
9You are limited to only joining two tables
- AVerdadeiro
- BFalso
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;- AVerdadeiro
- BFalso
11When checking to see if a value in a SQL statement is empty, we use what command?
- AEMPTY
- BVOID
- CMISSING
- DNULL
12when checking to see if a value is NULL, we have to use an "IS" statement instead of an = sign
- AVerdadeiro
- BFalso
Informações
- Descrição
- 1 Web Development Quiz sobre SQL joins, criado por jlangford em 05-06-2016.
- Autor
- jlangford
- Idioma
- English
- Visualizações
- 0
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz