Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 1 You want to create a view that when queried will display the name, customer identification number, new balance, finance charge, and credit

Question 51
You want to create a view that when queried will display the name, customer identification number, new balance, finance charge, and credit limit of all customers. When queried, the display should be sorted by credit limit from highest to lowest, then by the last name alphabetically. The view definition should be created regardless of the existence of the CUSTOMER and ACCOUNT tables. No DML may be performed when using this view. Evaluate these statements:
CREATE OR REPLACE FORCE VIEW CUST_CREDIT_V
AS SELECT c.last_name, c.first_name, c.customer_id, a.new_balance, a.finance_charge,
a.credit_limit
FROM customer c, account a
WHERE c.account_id = a.account_id
WITH READ ONLY;
SELECT *FROM cust_credit_v ORDER BY credit_limit DESC, last_name;
Which statement is true?
A.
When both statements are executed, all of the desired results are achieved.
B.
The CREATE VIEW statement will fail because a view may not be created on tables that do not exist or are not accessible by the user.
C.
The statements will not return all of the desired results because the WITH CHECK OPTION clause is not included in the CREATE VIEW statement.
D.
To achieve all of the desired results this ORDER BY clause should be added to the CREATE VIEW statement: ORDER BY a.credit_limit DESC, c.last_name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

3. Describe the expectancy and equity theories of motivation

Answered: 1 week ago