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
icon
Related questions
icon
Concept explainers
Question

Using the Winners table from Figure 12-2, write a SELECT statement that selects only
the Animated field for records whose Animated field begins with the letter R. Sort the
records in ascending order by the Animated 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
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
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
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education