Questions
Questions

BU.330.770.T2.FA25 Quiz 2- Requires Respondus LockDown Browser

Single choice

Which of the following SQL statements is invalid and will result in an error message? Assume that the BOOKS table currently has no constraints and contains no data. For your information, BOOKS and PUBLISHER tables have a relationship shown below:

Options
A.ALTER TABLE books ADD CONSTRAINT books_isbn_pk;
B.ALTER TABLE books ADD CONSTRAINT books_pubid_fk FOREIGN KEY (pubid) REFERENCES publisher (pubid);
C.ALTER TABLE books ADD CONSTRAINT books_isbn_pk PRIMARY KEY (isbn);
Question Image
View Explanation

View Explanation

Verified Answer
Please login to view
Step-by-Step Analysis
When evaluating which SQL statement is invalid in the given scenario, it helps to review what each statement is trying to do and what the table definitions imply. Option 1: ALTER TABLE books ADD CONSTRAINT books_isbn_pk; This statement is malformed. It attempts to add a constraint but does not specify the type of constraint (PRIMARY KEY, UNIQUE, FOREIGN KEY, etc.) nor t......Login to view full explanation

Log in for full answers

We've collected over 50,000 authentic exam questions and detailed explanations from around the globe. Log in now and get instant access to the answers!

More Practical Tools for Students Powered by AI Study Helper

Join us and instantly unlock extensive past papers & exclusive solutions to get a head start on your studies!