View the exhibit and examine the structure of the STORES table.
You must display the NAME of stores along with the ADDRESS, START_DATE, PROPERTY_PRICE, and the projected property price, which is 115% of property price.
The stores displayed must have START_DATE in the range of 36 months starting from 01-Jan-2000 and above.
WHERE TO_NUMBER(start_date-TO_DATE('01-JAN-2000','DD-MON-RRRR')) <=36;
SELECT name, address||', '||city||', '||country AS full_address, start_date,
property_price, property_price*115/100
FROM stores
WHERE MONTHS_BETWEEN(start_date,TO_DATE('01-JAN-2000','DD-MON-RRRR')) <=36;
SELECT name, concat (address||','| |city| |', ', country) AS full_address,
start_date,
property_price, property_price*115/100
FROM stores
WHERE MONTHS_BETWEEN (start_date, TO_DATE('01-JAN-2000','DD-MON-RRRR')) <=36;
Correct answer: D
Question 2
The BOOKS_TRANSACTIONS table exists in your database.
SQL>SELECT * FROM books_transactions ORDER BY 3;
What is the outcome on execution?
The execution fails unless the numeral 3 in the ORDER BY clause is replaced by a column name.
Rows are displayed in the order that they are stored in the table only for the three rows with the lowest values in the key column.
Rows are displayed in the order that they are stored in the table only for the first three rows.
Rows are displayed sorted in ascending order of the values in the third column in the table.
Correct answer: D
Question 3
Examine the command:
What does ON DELETE CASCADE imply?
When the BOOKS table is dropped, the BOOK_TRANSACTIONS table is dropped.
When the BOOKS table is dropped, all the rows in the BOOK_TRANSACTIONS table are deleted but the table structure is retained.
When a row in the BOOKS table is deleted, the rows in the BOOK_TRANSACTIONS table whose BOOK_ID matches that of the deleted row in the BOOKS table are also deleted.
When a value in the BOOKS.BOOK_ID column is deleted, the corresponding value is updated in the BOOKS_TRANSACTIONS.BOOK_ID column.