Winners table in the Oscars.mdf database Name Data Type Allow Nulls Default o Year int Actor varchar(50) Actiess varchar(50) Picture varchar(50) Animated varchar(50) Year Actor Actress Picture Animated 2008 2009 Danicl Day-Lewis Marion Cotillard No Country for Old Men Ratatouille Scon Penn Kete Winslet Slumdog Millioneire WALL-E 2010 Jeff Bridges Sandra Bullock The Hurt Locker Up 2011 Colin Firth Natalie Portman The King's Speech Toy Story 3 2012 2013 2014 Jean Dujardin Meryl Streep The Artist Rango Danid-Day Lewis Jennifer Lawrence Argo Brave Matthew McConaughey Cate Blanchett Eddie Redmayne 12 Vears a Slave Frozen 2015 Julianne Moore Birdman Big Hero 6 2016 2017 Leonardo DiCaprio Brie Larson Spotlight Inside Out Casey Affleck Emma Stone Moonlight Zoctopia Example 1 SELECT Year, Actor, Actress, Picture, Animated FROM Winners selects all of the fields and records from the table Example 2 SELECT Year, Actor, Actress, Picture, Animated FROM Winners WHERE Year >= 2014 selects all of the fields from records for the year 2014 and later Example 3 SELECT Year FROM Winners WHERE Picture = 'Argo' selects the Year field for the Argo record (continued) Example 4 SELECT Year, Picture FROM Winners WHERE Picture LIKE 'The %' selects the Year and Picture fields for all records whose Picture field begins with the word "The" followed by a space and zero or more characters Example 5 SELECT Year, Animated FROM Winners WHERE Year = 2010 OR Year = 2015 ORDER BY Year DESC selects the Year and Animated fields for records whose Year field contains either 2010 or 2015 and then arranges the records in descending order by the Year field
Winners table in the Oscars.mdf database Name Data Type Allow Nulls Default o Year int Actor varchar(50) Actiess varchar(50) Picture varchar(50) Animated varchar(50) Year Actor Actress Picture Animated 2008 2009 Danicl Day-Lewis Marion Cotillard No Country for Old Men Ratatouille Scon Penn Kete Winslet Slumdog Millioneire WALL-E 2010 Jeff Bridges Sandra Bullock The Hurt Locker Up 2011 Colin Firth Natalie Portman The King's Speech Toy Story 3 2012 2013 2014 Jean Dujardin Meryl Streep The Artist Rango Danid-Day Lewis Jennifer Lawrence Argo Brave Matthew McConaughey Cate Blanchett Eddie Redmayne 12 Vears a Slave Frozen 2015 Julianne Moore Birdman Big Hero 6 2016 2017 Leonardo DiCaprio Brie Larson Spotlight Inside Out Casey Affleck Emma Stone Moonlight Zoctopia Example 1 SELECT Year, Actor, Actress, Picture, Animated FROM Winners selects all of the fields and records from the table Example 2 SELECT Year, Actor, Actress, Picture, Animated FROM Winners WHERE Year >= 2014 selects all of the fields from records for the year 2014 and later Example 3 SELECT Year FROM Winners WHERE Picture = 'Argo' selects the Year field for the Argo record (continued) Example 4 SELECT Year, Picture FROM Winners WHERE Picture LIKE 'The %' selects the Year and Picture fields for all records whose Picture field begins with the word "The" followed by a space and zero or more characters Example 5 SELECT Year, Animated FROM Winners WHERE Year = 2010 OR Year = 2015 ORDER BY Year DESC selects the Year and Animated fields for records whose Year field contains either 2010 or 2015 and then arranges the records in descending order by the Year field
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Using the Winners table from Figure 12-2, write a parameter query that selects the
Actor and Actress fields for the year provided by the user.
![Winners table in the Oscars.mdf database
Name
Data Type Allow Nulls Default
o Year
int
Actor
varchar(50)
Actiess
varchar(50)
Picture
varchar(50)
Animated
varchar(50)
Year
Actor
Actress
Picture
Animated
2008
2009
Danicl Day-Lewis
Marion Cotillard
No Country for Old Men Ratatouille
Scon Penn
Kete Winslet
Slumdog Millioneire
WALL-E
2010
Jeff Bridges
Sandra Bullock
The Hurt Locker
Up
2011
Colin Firth
Natalie Portman
The King's Speech
Toy Story 3
2012
2013
2014
Jean Dujardin
Meryl Streep
The Artist
Rango
Danid-Day Lewis
Jennifer Lawrence Argo
Brave
Matthew McConaughey Cate Blanchett
Eddie Redmayne
12 Vears a Slave
Frozen
2015
Julianne Moore
Birdman
Big Hero 6
2016
2017
Leonardo DiCaprio
Brie Larson
Spotlight
Inside Out
Casey Affleck
Emma Stone
Moonlight
Zoctopia
Example 1
SELECT Year, Actor, Actress, Picture, Animated FROM Winners
selects all of the fields and records from the table
Example 2
SELECT Year, Actor, Actress, Picture, Animated FROM Winners
WHERE Year >= 2014
selects all of the fields from records for the year 2014 and later
Example 3
SELECT Year FROM Winners WHERE Picture =
'Argo'
selects the Year field for the Argo record](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F75d884b2-bc98-4812-8abf-edb4c12a1a51%2F8d588796-4689-44c2-9bda-00733710e261%2F2t9e22w.jpeg&w=3840&q=75)
Transcribed Image Text:Winners table in the Oscars.mdf database
Name
Data Type Allow Nulls Default
o Year
int
Actor
varchar(50)
Actiess
varchar(50)
Picture
varchar(50)
Animated
varchar(50)
Year
Actor
Actress
Picture
Animated
2008
2009
Danicl Day-Lewis
Marion Cotillard
No Country for Old Men Ratatouille
Scon Penn
Kete Winslet
Slumdog Millioneire
WALL-E
2010
Jeff Bridges
Sandra Bullock
The Hurt Locker
Up
2011
Colin Firth
Natalie Portman
The King's Speech
Toy Story 3
2012
2013
2014
Jean Dujardin
Meryl Streep
The Artist
Rango
Danid-Day Lewis
Jennifer Lawrence Argo
Brave
Matthew McConaughey Cate Blanchett
Eddie Redmayne
12 Vears a Slave
Frozen
2015
Julianne Moore
Birdman
Big Hero 6
2016
2017
Leonardo DiCaprio
Brie Larson
Spotlight
Inside Out
Casey Affleck
Emma Stone
Moonlight
Zoctopia
Example 1
SELECT Year, Actor, Actress, Picture, Animated FROM Winners
selects all of the fields and records from the table
Example 2
SELECT Year, Actor, Actress, Picture, Animated FROM Winners
WHERE Year >= 2014
selects all of the fields from records for the year 2014 and later
Example 3
SELECT Year FROM Winners WHERE Picture =
'Argo'
selects the Year field for the Argo record
![(continued)
Example 4
SELECT Year, Picture FROM Winners
WHERE Picture LIKE 'The %'
selects the Year and Picture fields for all records whose Picture field begins with the word
"The" followed by a space and zero or more characters
Example 5
SELECT Year, Animated FROM Winners
WHERE Year = 2010 OR Year = 2015
ORDER BY Year DESC
selects the Year and Animated fields for records whose Year field contains either 2010 or 2015
and then arranges the records in descending order by the Year field](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F75d884b2-bc98-4812-8abf-edb4c12a1a51%2F8d588796-4689-44c2-9bda-00733710e261%2Fi6gg14a.jpeg&w=3840&q=75)
Transcribed Image Text:(continued)
Example 4
SELECT Year, Picture FROM Winners
WHERE Picture LIKE 'The %'
selects the Year and Picture fields for all records whose Picture field begins with the word
"The" followed by a space and zero or more characters
Example 5
SELECT Year, Animated FROM Winners
WHERE Year = 2010 OR Year = 2015
ORDER BY Year DESC
selects the Year and Animated fields for records whose Year field contains either 2010 or 2015
and then arranges the records in descending order by the Year field
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
Step 1: Parameter query
- A query that has a parameter marker instead of a value of criteria is called as parameter query.
- The user uses a parameter query, when they do not know the particular value to involve in the criteria.
- In Structured Query Language (SQL), the symbol “@” is used as a parameter marker followed by the field’s name the user is querying.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education