16. The rows in the ORDERS table are currently stored in ascending order by ORDE
ID: 3595463 • Letter: 1
Question
16. The rows in the ORDERS table are currently stored in ascending order by ORDERNO. You want the rows in the ORDERS table to be stored in descending order by CUSTOMERNO. The only index on the table is ORDERNO_IDX, which is on the ORDERNO column in ascending order. What must you do? *This question is required.
a. Use CREATE INDEX to create a descending index on the CUSTOMERNO column, including the CLUSTER option
b. First, use CREATE INDEX to create a descending index on the CUSTOMERNO column, including the CLUSTER option. Then, use ALTER INDEX on the ORDERNO_IDX index to set the NOT CLUSTER option
c. First, use ALTER INDEX on the ORDERNO_IDX index to set the NOT CLUSTER option. Then, use CREATE INDEX to create a descending index on the CUSTOMERNO column, including the CLUSTER option
d. First, use ALTER TABLE to set the ORDERNO column to NOT CLUSTER. Then, use ALTER TABLE to set the CUSTOMERNO column to CLUSTER DESC
18. Which of the following statements is TRUE concerning the characteristics of a MODE ANSI database? *This question is required.
a. Uses unbuffered logging by default, but can be switched to buffered logging
b. Uses cursor stability by default, but can be switched to any other isolation level
c. All SQL statements are implicitly contained in transactions
d. Default table and synonym privileges are granted to user PUBLIC
21. Three rows are being updated by the following statement:
UPDATE items
SET quantity = quantity - 10
WHERE itemcode in ('A100','A102','B590');
The following trigger has been defined on the items table:
CREATE TRIGGER item_trig
UPDATE OF quantity ON items
BEFORE (EXECUTE PROCEDURE qty_proc);
How many times will the qty_proc procedure be executed? *This question is required.
a. 0
b. 1
c. 3
d. 10
Explanation / Answer
Hi,
This question has multiple questions which are indepdent of each other, answering the first one as per chegg policy, please post others as separate questions
1.Given currently rows are stored in order if ORDERNO, means there is a clustered index on ORDERNO,
since we want to sort the rows based on CUSTOMERNO, we first have to remove that index(as only one clustered index is possible per table)
hence the most viable option will be to
First, use ALTER INDEX on the ORDERNO_IDX index to set the NOT CLUSTER option. Then, use CREATE INDEX to create a descending index on the CUSTOMERNO column, including the CLUSTER option
Thumbs up if this was helpful , otherwise let me know in comments
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.