and 8 Question and answers rated A+ 2025/2026
1. 7.1 LAB - Alter Movie table
ALTER TABLE Movie
The Movie table has the following ADD Producer VAR-
columns: ID - positive integer CHAR(50);
Title - variable-length string
Genre - variable-length
string ALTER TABLE Movie
RatingCode - variable-length string DROP Genre;
Year - integer
ALTER TABLE Movie
CHANGE Year ReleaseYear
Write ALTER statements to make the following modifi- SMALLINT;
cations to the Movie table:
1. Add a Producer column with VARCHAR data
type (max 50 chars).
2. Remove the Genre column.
3. Change the Year column's name to ReleaseYear,
and change the data type to SMALLINT.
2. 7.2 LAB - Insert rows into Horse table INSERT INTO Horse
The Horse table has the following (RegisteredName,
columns: ID - integer, auto increment, Breed, Height,
primary key RegisteredName - variable- BirthDate) VALUES
length string
Breed - variable-length string, must be one of ('Babe',
the following: Egyptian Arab, Holsteiner, Quarter 'Quarter Horse', 15.3,
Horse, Paint, Saddlebred '2015-02-10');
Height - decimal number, must be between 10.0
and 20.0
INSERT INTO Horse
BirthDate - date, must be on or after Jan 1, 2015
(RegisteredName,
Insert the following data into the Horse Breed, Height,
table: RegisteredName Breed Height BirthDate) VALUES
('Indepen- dence',
'Holsteiner', 16.0,
'2017-03-13');
,INSERT INTO Horse
, WGU - D427 Data Management - Applications ZyBooks Labs 7 and 8
Study online at https://quizlet.com/_e21dn6
(RegisteredName, Breed, Height, BirthDate) VALUES ('El-
lie', 'Saddlebred', 15.0,
'2016-12-22');
INSERT INTO Horse
(Breed, Height, Birth-
Date)
VALUES ('Egyptian
Arab', 14.9, '2019-10-
12');
3. 7.3 LAB - Update rows in Horse table
UPDATE Horse
The Horse table has the following
columns: ID - integer, auto increment, SET Height =
primary key RegisteredName - variable- 15.6 WHERE ID
length string = 2;
Breed - variable-length string, must be one of
the following: Egyptian Arab, Holsteiner, Quarter
Horse, Paint, Saddlebred UPDATE Horse
Height - decimal number, must be e10.0 and SET RegisteredName =
d20.0 BirthDate - date, must be eJan 1, 2015 'Lady Luck',
BirthDate = '2015-05-01'
Make the following updates:
1.- Change the height to 15.6 for horse with ID WHERE ID = 4;
2. 2.- Change the registered name to Lady
UPDATE Horse
4. 7.4 LAB - Delete rows from Horse table SET Breed =
The Horse table has the following NULL
columns: ID - integer, auto increment, WHERE BirthDate
primary key RegisteredName - variable- >= '2016-12-
length string Breed - variable-length
string 22';
DELETE FROM Horse
WHERE ID = 5;