Search Header Logo

SQL Views and Stored Procedures Quiz

Authored by ARLENE QUICAY

Information Technology (IT)

University

Used 2+ times

SQL Views and Stored Procedures Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why might an error occur when updating the ReturnDate column using the vw_BorrowedBooksInfo view?

The view uses a join to retrieve its records

The view includes a computed column in the output

The view uses a WHERE clause to filter values

The view was not indexed on the primary key

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What condition must be added to the vw_BorrowedBooksInfo view to return only overdue, still borrowed books?

WHERE ReturnStatus = 'Returned Late'

WHERE ReturnDate IS NULL AND BorrowDate < GETDATE()

WHERE ReturnStatus = 'Still Borrowed' AND BorrowDate < DATEADD(DAY, -14, GETDATE())

WHERE ReturnStatus = 'Returned On Time' AND BorrowDate IS NOT NULL

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is the vw_AvailableBooks view allowed to be updated using an UPDATE statement?

The view contains only one base table and no complex joins

The view filters with a condition but has no case logic

The view returns selected fields from multiple base tables

The view was indexed on its foreign key columns

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which change would most likely prevent the vw_BorrowedBooksInfo view from being updated?

Adding a CASE expression to classify borrow status

Adding an ORDER BY clause to the view definition

Adding a JOIN with the Books table for genre details

Adding a GROUP BY clause to summarize borrow counts

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it helpful to calculate ReturnStatus directly within the vw_BorrowedBooksInfo view?

It makes output easier to interpret across related queries

It forces SQL Server to cache values for quick filtering

It avoids needing to create an additional summary table

It ensures primary keys are properly preserved in joins

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which view structure would make updating book quantities through vw_AvailableBooks invalid?

Adding a derived column using arithmetic logic

Adding a CASE expression for genre classification

Adding a JOIN with another supporting lookup table

Adding a column alias to change a field name

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method would best identify members who have never borrowed a book?

Using a GROUP BY clause on the Members table

Joining Members and BorrowedBooks with INNER JOIN

Performing a LEFT JOIN and filtering for NULL in the result

Filtering the BorrowedBooks table for ReturnDate IS NULL

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?