Select Queries
A select query looks at the data and pulls out a
handful of records. Programmers always describe it as getting the
red jellybeans out of the jar. Our first step in designing a query
is to analyze the data.
Go to the Tables and double click to open the
Movie table, tblMovieTitles. For each movie in the database, there
is a title, the year it was released, the rating and the genre.
There is a field for the rental price, but it is
empty. The RentalID refers to the prices in the Rental table.
All of the movies in
tblMovieTitles need to be
updated with rental data. Who wants to go through hundreds of records
and enter the information by hand?
There’s a better way.