Exact of 1Z0-061 test question materials and rapidshare for Oracle certification for IT specialist, Real Success Guaranteed with Updated 1Z0-061 pdf dumps vce Materials. 100% PASS Oracle Database 12c SQL Fundamentals exam Today!

2021 Sep 1Z0-061 exam guide

Q31. Evaluate the following query: 

What would be the outcome of the above query? 

A. It produces an error because flower braces have been used. 

B. It produces an error because the data types are not matching. 

C. It executes successfully and introduces an 's at the end of each PROMO_NAME in the output. 

D. It executes successfully and displays the literal "{'s start date was } * for each row in the output. 

Answer: C Explanation: 

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. 

Q32. Which statement is true regarding the UNION operator? 

A. By default, the output is not sorted. 

B. Null values are not ignored during duplicate checking. 

C. Names of all columns must be identical across all select statements. 

D. The number of columns selected in all select statements need not be the same. 

Answer: D 


The SQL UNION query allows you to combine the result sets of two or more SQL SELECT statements. It removes duplicate rows between the various SELECT statements. Each SQL SELECT statement within the UNION query must have the same number of fields in the result sets with similar data types. 

Q33. Examine the structure and data of the CUST_TRANS table: 

Dates are stored in the default date format dd-mon-rr in the CUST_TRANS table. Which three SQL statements would execute successfully? 

A. SELECT transdate + '10' FROM cust_trans; 

B. SELECT * FROM cust_trans WHERE transdate = '01-01-07' 

C. SELECT transamt FROM cust_trans WHERE custno > "11"; 

D. SELECT * FROM cust_trans WHERE transdate='01-JANUARY-07' 

E. SELECT custno + 'A' FROM cust_trans WHERE transamt > 2000; 

Answer: A,C,D 

Q34. Examine the structure of the orders table: 

You want to find the total value of all the orders for each year and issue the following command: 

Which statement is true regarding the outcome? 

A. It executes successfully and gives the correct output. 

B. It gives an error because the TO_CHAR function is not valid. 

C. It executes successfully but does not give the correct output. 

D. It gives an error because the data type conversion in the SELECT list does not match the data type conversion in the GROUP BY clause. 

Answer: D 

Q35. Examine the data in the CUST_NAME column of the customers table. 

You need to display customers' second names where the second name starts with "Mc" or "MC." 

Which query gives the required output? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: B 

1Z0-061  test question

Regenerate 1Z0-061 practice test:

Q36. Which three tasks can be performed using SQL functions built into Oracle Database? 

A. Displaying a date in a nondefault format 

B. Finding the number of characters in an expression 

C. Substituting a character string in a text expression with a specified string 

D. Combining more than two columns or expressions into a single column in the output 

Answer: A,B,C 

Q37. Which two statements are true regarding subqueries? 

A. A subquery can retrieve zero or more rows. 

B. Only two subqueries can be placed at one level. 

C. A subquery can be used only in SQL query statements. 

D. A subquery can appear on either side of a comparison operator. 

E. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement. 

Answer: A,D 


Using a Subquery to Solve a Problem Suppose you want to write a query to find out who earns a salary greater than Abel’s salary. To solve this problem, you need two queries: one to find how much Abel earns, and a second query to find who earns more than that amount. You can solve this problem by combining the two queries, placing one query inside the other query. The inner query (or subquery) returns a value that is used by the outer query (or main query). Using a subquery is equivalent to performing two sequential queries and using the result of the first query as the search value in the second query. Subquery Syntax A subquery is a SELECT statement that is embedded in the clause of another SELECT statement. You can build powerful statements out of simple ones by using subqueries. They can be very useful when you need to select rows from a table with a condition that depends on the data in the table itself. You can place the subquery in a number of SQL clauses, including the following: WHERE clause HAVING clause FROM clause In the syntax: operator includes a comparison condition such as >, =, or IN Note: Comparison conditions fall into two classes: single-row operators (>, =, >=, <, <>, <=) and multiple-row operators (IN, ANY, ALL, EXISTS). The subquery is often referred to as a nested SELECT, sub-SELECT, or inner SELECT statement. The subquery generally executes first, and its output is used to complete the query condition for the main (or outer) query. Guidelines for Using Subqueries Enclose subqueries in parentheses. Place subqueries on the right side of the comparison condition for readability. (However, the subquery can appear on either side of the comparison operator.) Use single-row operators with single-row subqueries and multiple-row operators with multiple-row subqueries. 

Subqueries can be nested to an unlimited depth in a FROM clause but to “only” 255 levels in a WHERE clause. They can be used in the SELECT list and in the FROM, WHERE, and HAVING clauses of a query. 

Q38. Examine the data in the PROMO_BEGIN_DATE column of the promotions table: 

You want to display the number of promotions started in 1999 and 2000. Which query gives the correct output? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A 

Q39. View the Exhibit and examine the structure of the CUSTOMERS table. 

You have been asked to produce a report on the customers table showing the customers details sorted in descending order of the city and in the descending order of their income level in each city. 

Which query would accomplish this task? 

A. Option A 

B. Option B 

C. Option C D. Option D 

Answer: A 

Q40. Evaluate the following SQL statement: 

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

A. It executes successfully and displays rows in the descending order of PROMO_CATEGORY. 

B. It produces an error because positional notation cannot be used in the order by clause with set operators. 

C. It executes successfully but ignores the order by clause because it is not located at the end of the compound statement. 

D. It produces an error because the order by clause should appear only at the end of a compound query-that is, with the last select statement. 

Answer: D