Activity 03
Activity 03
DIRECTION:
CREATE DATABASE
db_rental;
2. Write a query to create a table named tbl_movies with the following columns:
movie_id, title, actor, genre and director. Use the appropriate data type
and constraints in each column.
CREATE TABLE tbl_movies (
movie_id,
title,
actor,
genre,
director );
4. Write a query that will show the title and actor of movies directed by Cathy
Garcia-Molina.
5. Write a query that will show all fields of dramatic comedy movies.
SELECT * FROM tbl_movies WHERE genre=” Dramatic Comedy”
6. Write a query that will insert a new data provided the ff: title=Cuddle Weather,
actor=Sue Ramirez and genre=Romantic Drama.
INSERT INTO tbl_movies (title, actor, genre) VALUES (‘Cuddle Weather’, Sue
Ramirez’, ‘Romantic Drama’)
7. Write a query that will modify the actor of movie 1002. (actor=Brenna Garcia)
8. Write a query that will delete the records of the movie Dukot.
9. Write a query that will sort the table based on the title of the movie in ascending
order.
10. Write a query that will retrieve the title, genre and director of the movie done by
Daniel and Kathryn.
SELECT title, genre, director FROM tbl_movies WHERE actor=” Daniel and
Kathryn”