Oracle 1z0-061 Exam Practice Questions (P. 2)
- Full Access (339 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 #11
Which three SQL statements would display the value 1890.55 as $1, 890.55?


send
light_mode
delete
Question #12
You want to display 5 percent of the employees with the highest salaries in the EMPLOYEES table.
Which query will generate the required result?

Which query will generate the required result?

- AOption A
- BOption BMost Voted
- COption C
- DOption D B
Correct Answer:
Explanation
FETCH can only be used with FIRST OR NEXT. The syntax is:
FETCH { FIRST | NEXT } [integer-literal | ? ] {ROW | ROWS} ONLY
OFFSET { integer-literal | ? } {ROW | ROWS}
Reference:
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljoffsetfetch.html
Explanation
FETCH can only be used with FIRST OR NEXT. The syntax is:
FETCH { FIRST | NEXT } [integer-literal | ? ] {ROW | ROWS} ONLY
OFFSET { integer-literal | ? } {ROW | ROWS}
Reference:
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljoffsetfetch.html
send
light_mode
delete
Question #13
In the customers table, the CUST_CITY column contains the value 'Paris' for the CUST_FIRST_NAME 'Abigail'.
Evaluate the following query:

What would be the outcome?
Evaluate the following query:

What would be the outcome?
send
light_mode
delete
Question #14
View the Exhibit and evaluate the structure and data in the CUST_STATUS table.

You issue the following SQL statement:

Which statement is true regarding the execution of the above query?

You issue the following SQL statement:

Which statement is true regarding the execution of the above query?
- AIt produces an error because the AMT_SPENT column contains a null value.
- BIt displays a bonus of 1000 for all customers whose AMT_SPENT is less than CREDIT_LIMIT.
- CIt displays a bonus of 1000 for all customers whose AMT_SPENT equals CREDIT_LIMIT, or AMT_SPENT is null.
- DIt produces an error because the TO_NUMBER function must be used to convert the result of the NULLIF function before it can be used by the NVL2 function.
Correct Answer:
C
The NULLIF Function -
The NULLIF function tests two terms for equality. If they are equal the function returns a null, else it returns the first of the two terms tested.
The NULLIF function takes two mandatory parameters of any data type. The syntax is NULLIF(ifunequal, comparison_term), where the parameters ifunequal and comparison_term are compared. If they are identical, then NULL is returned. If they differ, the ifunequal parameter is returned.
C
The NULLIF Function -
The NULLIF function tests two terms for equality. If they are equal the function returns a null, else it returns the first of the two terms tested.
The NULLIF function takes two mandatory parameters of any data type. The syntax is NULLIF(ifunequal, comparison_term), where the parameters ifunequal and comparison_term are compared. If they are identical, then NULL is returned. If they differ, the ifunequal parameter is returned.
send
light_mode
delete
Question #15
Which normal form is a table in if it has no multi-valued attributes and no partial dependencies?
- AFirst normal form
- BSecond normal form
- CThird normal form
- DFourth normal form
Correct Answer:
B
According to the Second Normal Form (2NF) there must be no partial dependencies on a concatenated key.
B
According to the Second Normal Form (2NF) there must be no partial dependencies on a concatenated key.
send
light_mode
delete
Question #16
Examine the types and examples of relationships that follow:
1. One-to-one a) Teacher to students
2. One-to-many b) Employees to Manager
3. Many-to-one c) Person to SSN
4. Many-to-many d) Customers to products
Which option indicates the correctly matched relationships?
1. One-to-one a) Teacher to students
2. One-to-many b) Employees to Manager
3. Many-to-one c) Person to SSN
4. Many-to-many d) Customers to products
Which option indicates the correctly matched relationships?
- A1-a, 2-b, 3-c, and 4-d
- B1-c, 2-d, 3-a, and 4-b
- C1-c, 2-a, 3-b, and 4-d
- D1-d, 2-b, 3-a, and 4-c
Correct Answer:
C
C
send
light_mode
delete
Question #17
You execute the following commands:

For which substitution variables are you prompted for the input?

For which substitution variables are you prompted for the input?
- ANone, because no input required
- BBoth the substitution variables 'hiredate' and 'mgr_id\
- COnly 'hiredate'
- DOnly 'mgr_id'
Correct Answer:
D
D
send
light_mode
delete
Question #18
View the Exhibit and examine the structure of the customers table.

Using the customers table, you need to generate a report that shows the average credit limit for customers in Washington and NEW YORK.
Which SQL statement would produce the required result?


Using the customers table, you need to generate a report that shows the average credit limit for customers in Washington and NEW YORK.
Which SQL statement would produce the required result?

send
light_mode
delete
Question #19
View the Exhibit and examine the data in the employees table:

You want to display all the employee names and their corresponding manager names.
Evaluate the following query:

Which join option can be used in the blank in the above query to get the required output?

You want to display all the employee names and their corresponding manager names.
Evaluate the following query:

Which join option can be used in the blank in the above query to get the required output?
send
light_mode
delete
Question #20
Evaluate the following query:

What would be the outcome of the above query?

What would be the outcome of the above query?
- AIt produces an error because flower braces have been used.
- BIt produces an error because the data types are not matching.
- CIt executes successfully and introduces an 's at the end of each PROMO_NAME in the output.
- DIt executes successfully and displays the literal "{'s start date was \} * for each row in the output.
Correct Answer:
C
So, how are words that contain single quotation marks dealt with? There are essentially two mechanisms available. The most popular of these is to add an additional single quotation mark next to each naturally occurring single quotation mark in the character string
Oracle offers a neat way to deal with this type of character literal in the form of the alternative quote (q) operator. Notice that the problem is that Oracle chose the single quote characters as the special pair of symbols that enclose or wrap any other character literal. These character-enclosing symbols could have been anything other than single quotation marks.
Bearing this in mind, consider the alternative quote (q) operator. The q operator enables you to choose from a set of possible pairs of wrapping symbols for character literals as alternatives to the single quote symbols. The options are any single-byte or multibyte character or the four brackets: (round brackets), {curly braces}, [squarebrackets], or <angle brackets>. Using the q operator, the character delimiter can effectively be changed from a single quotation mark to any other character
The syntax of the alternative quote operator is as follows:
q'delimiter'character literal which may include the single quotes delimiter' where delimiter can be any character or bracket.
Alternative Quote (q) Operator -
Specify your own quotation mark delimiter.
Select any delimiter.
Increase readability and usability.
SELECT department_name || q'[ Department's Manager Id: ]'
|| manager_id
AS "Department and Manager"
FROM departments;
Alternative Quote (q) Operator -
Many SQL statements use character literals in expressions or conditions. If the literal itself contains a single quotation mark, you can use the quote (q) operator and select your own quotation mark delimiter.
You can choose any convenient delimiter, single-byte or multi byte, or any of the following character pairs: [ ], { }, ( ), or < >.
In the example shown, the string contains a single quotation mark, which is normally interpreted as a delimiter of a character string. By using the q operator, however, brackets [] are used as the quotation mark delimiters. The string between the brackets delimiters is interpreted as a literal character string.
C
So, how are words that contain single quotation marks dealt with? There are essentially two mechanisms available. The most popular of these is to add an additional single quotation mark next to each naturally occurring single quotation mark in the character string
Oracle offers a neat way to deal with this type of character literal in the form of the alternative quote (q) operator. Notice that the problem is that Oracle chose the single quote characters as the special pair of symbols that enclose or wrap any other character literal. These character-enclosing symbols could have been anything other than single quotation marks.
Bearing this in mind, consider the alternative quote (q) operator. The q operator enables you to choose from a set of possible pairs of wrapping symbols for character literals as alternatives to the single quote symbols. The options are any single-byte or multibyte character or the four brackets: (round brackets), {curly braces}, [squarebrackets], or <angle brackets>. Using the q operator, the character delimiter can effectively be changed from a single quotation mark to any other character
The syntax of the alternative quote operator is as follows:
q'delimiter'character literal which may include the single quotes delimiter' where delimiter can be any character or bracket.
Alternative Quote (q) Operator -
Specify your own quotation mark delimiter.
Select any delimiter.
Increase readability and usability.
SELECT department_name || q'[ Department's Manager Id: ]'
|| manager_id
AS "Department and Manager"
FROM departments;
Alternative Quote (q) Operator -
Many SQL statements use character literals in expressions or conditions. If the literal itself contains a single quotation mark, you can use the quote (q) operator and select your own quotation mark delimiter.
You can choose any convenient delimiter, single-byte or multi byte, or any of the following character pairs: [ ], { }, ( ), or < >.
In the example shown, the string contains a single quotation mark, which is normally interpreted as a delimiter of a character string. By using the q operator, however, brackets [] are used as the quotation mark delimiters. The string between the brackets delimiters is interpreted as a literal character string.
send
light_mode
delete
All Pages