Chapter 2- Structured Query Language in Action
Chapter 2- Structured Query Language in Action
2. The Primary key helps identify each record in a table uniquely. Each table can have
only one primary key. Whereas a foreign key creates a link between two tables. It
ensures that a value in one table matches a valid value in another table. A table can have
more than one foreign key.
4. The SELECT statement fetches data from one or more tables. This statement, allows
you to obtain records from all the fields or specified fields that match the defined criteria.
5. The ALTER TABLE statement is used to add, delete, or modify columns in an
existing table. The ALTER command is always used in conjunction with the ADD,
DROP, and MODIFY commands, depending on the requirement. While the UPDATE
command is used to modify or change existing records in a table.
E. Competency-based questions.
1. Primary key
2. SELECT title, genre, release_year
FROM Movies
WHERE release_year > 2020;
EXTRA QUESTIONS