Oracle 1z0-071 Exam Practice Questions (P. 5)
- Full Access (272 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #21
Which two are true about unused columns? (Choose two.)
- AA query can return data from unused columns, but no DML is possible on those columns.
- BUnused columns retain their data until they are dropped.Most Voted
- COnce a column has been set to unused, a new column with the same name can be added to the table.Most Voted
- DThe DESCRIBE command displays unused columns.
- EA primary key column cannot be set to unused.
- FA foreign key column cannot be set to unused.
Correct Answer:
BC
Reference:
https://decipherinfosys.wordpress.com/2007/11/15/back-to-the-basics-dropping-unused-columns-in-oracle/
BC
Reference:
https://decipherinfosys.wordpress.com/2007/11/15/back-to-the-basics-dropping-unused-columns-in-oracle/
send
light_mode
delete
Question #22
Which two are true about the precedence of operators and conditions? (Choose two.)
- A|| has a higher order of precedence than + (addition).
- B+ (addition) has a higher order of precedence than * (multiplication).
- CNOT has a higher order of precedence than AND and OR in a condition.Most Voted
- DAND and OR have the same order of precedence in a condition.
- EOperators are evaluated before conditions.Most Voted
Correct Answer:
CE
CE

When examining operator precedence in SQL, it's crucial to grasp that operators indeed have precedence over conditions during expression evaluation. Specifically, the NOT operator holds priority over AND and OR, effectively clarifying logical evaluation in statements. Maintaining awareness of this structure ensures the correct interpretation and intended outcomes of complex SQL queries. This knowledge is fundamental for writing precise and efficient SQL code, aligning with SQL best practices.
send
light_mode
delete
Question #23
In your session, the NLS_DATE_FORMAT is DD-MM-YYYY.
There are 86400 seconds in a day.
Examine this result:
DATE -
-----------
02-JAN-2020
Which statement returns this?
There are 86400 seconds in a day.
Examine this result:
DATE -
-----------
02-JAN-2020
Which statement returns this?
- ASELECT TO_CHAR(TO_DATE('29-10-2019') + INTERVAL '2' MONTH + INTERVAL '4' DAY - INTERVAL '120' SECOND, 'DD-MON-YYYY') AS "date" FROM DUAL;
- BSELECT TO_CHAR(TO_DATE('29-10-2019') + INTERVAL '3' MONTH + INTERVAL '7' DAY - INTERVAL '360' SECOND, 'DD-MON-YYYY') AS "date" FROM DUAL;
- CSELECT TO_CHAR(TO_DATE('29-10-2019') + INTERVAL '2' MONTH + INTERVAL '5' DAY - INTERVAL '120' SECOND, 'DD-MON-YYYY') AS "date" FROM DUAL;Most Voted
- DSELECT TO_CHAR(TO_DATE('29-10-2019') + INTERVAL '2' MONTH + INTERVAL '5' DAY - INTERVAL '86410' SECOND, 'DD-MON- YYYY') AS "date" FROM DUAL;
- ESELECT TO_CHAR(TO_DATE('29-10-2019') + INTERVAL '2' MONTH + INTERVAL '6' DAY - INTERVAL '120' SECOND, 'DD-MON-YYYY') AS "date" FROM DUAL;
Correct Answer:
C
C

Option C precisely achieves the desired result of giving the date '02-JAN-2020'. The process begins by converting '29-10-2019' to a date using TO_DATE. Adding '2' months jumps to '29-12-2019', and a further addition of '5' days results in '03-01-2020'. Subtracting '120' seconds (equivalent to two minutes) pulls the date back to just before midnight on '02-01-2020', hence producing the accurate result when formatted with 'DD-MON-YYYY'. It's a good example of manipulating date intervals and formats in SQL, which is essential for handling time-sensitive data correctly.
send
light_mode
delete
Question #24
Examine the data in the INVOICES table:

Examine the data in the CURRENCIES table:

Which query returns the currencies in CURRENCIES that are not present in INVOICES?
A.

B.

C.

D.


Examine the data in the CURRENCIES table:

Which query returns the currencies in CURRENCIES that are not present in INVOICES?
A.

B.

C.

D.

send
light_mode
delete
Question #25
The SALES table has columns PROD_ID and QUANTITY_SOLD of data type NUMBER.
Which two queries execute successfully? (Choose two.)
Which two queries execute successfully? (Choose two.)
- ASELECT prod_id FROM sales WHERE quantity_sold > 55000 AND COUNT(*) > 10 GROUP BY COUNT(*) > 10;
- BSELECT prod_id FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id HAVING COUNT(*) > 10;Most Voted
- CSELECT COUNT(prod_id) FROM sales GROUP BY prod_id WHERE quantity_sold > 55000;
- DSELECT prod_id FROM sales WHERE quantity_sold > 55000 AND COUNT(*) > 10 GROUP BY prod_id HAVING COUNT(*) > 10;
- ESELECT COUNT(prod_id) FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id;Most Voted
Correct Answer:
BE
BE

The correct query options B and E utilize fundamental SQL syntax appropriately. Option B effectively filters individual records with the WHERE clause before applying the GROUP BY clause, which organizes the results by prod_id, and then uses the HAVING clause, which is correctly used to filter groups formed by GROUP BY based on the aggregate function, COUNT(*). Similarly, option E employs the WHERE clause to initially filter the rows, followed by performing an aggregate function, COUNT(prod_id), on the grouped data by prod_id. This demonstrates standard SQL practices for grouping and filtering data.
send
light_mode
delete
All Pages