Applications Pre - Assessment (Latest 2026
/ 2027 Update) Questions & Answers
{Grade A} 100% Correct
Write a SQL statement to add the EngineSize column to the Vehicle table. - Correct
answer ALTER TABLE Vehicle
ADD Engine Size DECIMAL(2,1);
14. The Song table has the following columns:
ID—integer, primary key
Title—variable-length string
Genre—variable-length string
Year—integer
Write a SQL statement to create a view named MyMusic that contains the Title, Genre,
and Year columns for all movies books. Ensure your result set returns the columns in
the order
,indicated. - Correct answer CREATE VIEW MyMusic AS
SELECT Title, Genre, Year
FROM SONG;
15. A database has a view named MyMusic.
Write a SQL statement to delete the view named MyMusic from the database. - Correct
answer DROP VIEW MyMusic;
16. The Pet table has the following columns:
petID - integer, primary key
name - variable-length string
breed - variable-length string
birthdate - date
Write a SQL statement to modify the Pet table to make the petID column the primary
key. - Correct answer ALTER TABLE Pet
ADD PRIMARY KEY (petID);
,17. The Dog table has the following columns:
dogID - integer, primary key
name - variable-length string
breedID - integer
birthdate - date
The Breed table has the following columns:
breedID—integer
breedDescription—varchar
Releases—integer
Write a SQL statement to designate the breedID column in the Dog table as a foreign
key to the breedID column in the Breed table. - Correct answer ALTER TABLE Dog
ADD FOREIGN KEY (breedID) REFERENCES Breed (breedID);
18. The Song table has the following columns:
ID—integer, primary key
, Title—variable-length string
Genre—variable-length string
Year—integer
Write a SQL statement to create an index named idx_year on the Year column of the
Song table. - Correct answer CREATE INDEX idx_year
ON Song(Year);
19. The Podcast table has the following columns:
podcastID—integer, primary key, auto_increment
Title—variable-length string
Speaker—variable-length string
Minutes—integer
The following data needs to be added to the Podcast table:
Title Speaker Minutes
Rock Painting, Kecia McDonald, 25