Given a database table feedback with columns id, comment, and annotation, which SQL query returns all feedback comments along with their annotations?
Think about selecting both the comment and its annotation for all entries.
Option A selects both comment and annotation columns from all rows, which matches the requirement.
Option A filters only feedback without annotations.
Option A excludes annotations from the result.
Option A selects only annotations without comments.
Why is it important to store annotations separately from the original feedback comments in a database?
Think about how annotations might be added or changed over time.
Storing annotations separately allows adding multiple notes or updates without altering the original feedback, preserving its integrity.
Options A, B, and C do not reflect practical reasons for separate storage.
Which SQL statement correctly updates the annotation of a feedback entry with id = 5 to 'Reviewed and approved'?
Recall the standard SQL syntax for updating records.
Option C uses the correct UPDATE ... SET ... WHERE ... syntax.
Options A, B, and D use invalid or incorrect SQL syntax.
You have a large feedback table with millions of rows. Which approach will optimize queries filtering feedback by annotation status?
Think about how databases speed up searches on specific columns.
Creating an index on the annotation column helps the database quickly find rows matching annotation filters.
Options B, C, and D either reduce functionality or increase workload.
Given the table feedback with columns id (auto-increment), comment (text), and annotation (text), which INSERT statement will cause an error?
Assume id is auto-generated and should not be manually inserted.
Consider how auto-increment columns behave when manually inserting values.
Option D tries to manually insert a value into the auto-increment id column, which can cause a conflict or error depending on database settings.
Option D inserts NULL for id, which is allowed to trigger auto-increment.
Options B, C, and D are valid inserts.