Week 2 Flashcards
(11 cards)
What is select used for?
to select a subset of data from a table
What is a projection?
used to select a subset of columns from a table
What does ordering and distinct mean?
used to order the results and remove duplicates
What do joins do?
they combine data from multiple tables to retrieve desired information
What are the three different types of joins in sql?
inner, self, and outer
What does the join command return?
rows that have matching values in both tables
What does ‘as’ represent in sql?
we are giving something an alias
What does an outer join return?
rows that match the condition and exist in both tables
What does the left join return?
everything from table 1 and that is matching between table 1 and table 2
What does a right join return?
everything from table 2 and that is matching between table 1 and table 2
What does a full outer join return?
everything in both tables; table 1 rows, table 2 rows, matching from both