Cause all that matters here is passing the Oracle 1z0 061 dumps exam. Cause all that you need is a high score of 1z0 061 dumps pdf Oracle Database 12c SQL Fundamentals exam. The only one thing you need to do is downloading Actualtests 1z0 061 dumps pdf exam study guides now. We will not let you down with our money-back guarantee.

Q21. 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? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q22. View the Exhibit and examine the structure of the customers table. 

NEW_CUSTOMERS is a new table with the columns CUST_ID, CUST_NAME and CUST_CITY that have the same data types and size as the corresponding columns in the customers table. 

Evaluate the following insert statement: The insert statement fails when executed. 

What could be the reason? 

A. The values clause cannot be used in an INSERT with a subquery. 

B. Column names in the NEW_CUSTOMERS and CUSTOMERS tables do not match. 

C. The where clause cannot be used in a subquery embedded in an INSERT statement. 

D. The total number of columns in the NEW_CUSTOMERS table does not match the total number of columns in the CUSTOMERS table. 

Answer:

Explanation: 

Copying Rows from Another Table 

Write your INSERT statement with a subquery: 

Do not use the VALUES clause. 

Match the number of columns in the INSERT clause to those in the subquery. 

Inserts all the rows returned by the subquery in the table, sales_reps. 


Q23. 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:


Q24. Evaluate the following SQL commands: 

The command to create a table fails. Identify the two reasons for the SQL statement failure? 

A. You cannot use SYSDATE in the condition of a check constraint. 

B. You cannot use the BETWEEN clause in the condition of a check constraint. 

C. You cannot use the NEXTVAL sequence value as a default value for a column. 

D. You cannot use ORD_NO and ITEM_NO columns as a composite primary key because ORD_NO is also the foreign key. 

Answer: A,C 

Explanation: 

CHECK Constraint The CHECK constraint defines a condition that each row must satisfy. The condition can use the same constructs as the query conditions, with the following exceptions: References to the CURRVAL, NEXTVAL, LEVEL, and ROWNUM pseudocolumns Calls to SYSDATE, UID, USER, and USERENV functions Queries that refer to other values in other rows A single column can have multiple CHECK constraints that refer to the column in its definition. There is no limit to the number of CHECK constraints that you can define on a column. CHECK constraints can be defined at the column level or table level. CREATE TABLE employees (... Salary NUMBER(8, 2) CONSTRAINT emp_salary_min CHECK (salary > 0), 


Q25. View the Exhibit and examine the data in the PROMO_NAME and PROMO_END_DATE columns of the promotions table, and the required output format. 

Which two queries give the correct result? A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: C,D 


Q26. You execute the following commands: 

For which substitution variables are you prompted for the input? 

A. None, because no input required 

B. Both the substitution variables 'hiredate' and 'mgr_id\ 

C. Only 'hiredate' 

D. Only 'mgr_id' 

Answer:


Q27. You issue the following command to drop the products table: 

SQL> DROP TABLE products; 

Which three statements are true about the implication of this command? 

A. All data along with the table structure is deleted. 

B. A pending transaction in the session is committed. 

C. All indexes on the table remain but they are invalidated. 

D. All views and synonyms remain but they are invalidated. 

E. All data in the table is deleted but the table structure remains. 

Answer: A,B,D 


Q28. View the Exhibits and examine products and sales tables. 

You issue the following query to display product name and the number of times the product has been sold: 

What happens when the above statement is executed? 

A. The statement executes successfully and produces the required output. 

B. The statement produces an error because item_cnt cannot be displayed in the outer query. 

C. The statement produces an error because a subquery in the from clause and outer-joins cannot be used together. 

D. The statement produces an error because the group by clause cannot be used in a subquery in the from clause. 

Answer:


Q29. CORRECT TEXT 

View the Exhibit and examine the structure of the promotions table. 

You need to generate a report of all promos from the promotions table based on the following conditions: 

1. The promo name should not begin with 'T' or 'N'. 

2. The promo should cost more than $20000. 

3. The promo should have ended after 1st January 2001. 

Which where clause would give the required result? 

Answer: WHERE promo_name NOT LIKE ‘T%’ AND promo_name NOT LIKE ‘N%’ AND promo_cost > 20000 AND promo_end_date > ‘1-JAN-01' 


Q30. Which two statements are true regarding single row functions? 

A. MOD: returns the quotient of a division B. TRUNC: can be used with number and date values 

C. CONCAT: can be used to combine any number of values 

D. SYSDATE: returns the database server current date and time 

E. INSTR: can be used to find only the first occurrence of a character in a string 

F. TRIM: can be used to remove all the occurrences of a character from a string 

Answer: B,D 

Explanation: 

ROUND: Rounds value to a specified decimal TRUNC: Truncates value to a specified decimal MOD: Returns remainder of division SYSDATE is a date function that returns the current database server date and time. 

Date-Manipulation Functions Date functions operate on Oracle dates. All date functions return a value of the DATE data type except MONTHS_BETWEEN, which returns a numeric value. MONTHS_BETWEEN(date1, date2): Finds the number of months between date1 and date2. The result can be positive or negative. If date1 is later than date2, the result is positive; if date1 is earlier than date2, the result is negative. The noninteger part of the result represents a portion of the month. ADD_MONTHS(date, n): Adds n number of calendar months to date. The value of n must be an integer and can be negative. NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char') following date. The value of char may be a number representing a day or a character string. LAST_DAY(date): Finds the date of the last day of the month that contains date The above list is a subset of the available date functions. ROUND and TRUNC number functions can also be used to manipulate the date values as shown below: ROUND(date[, 'fmt']): Returns date rounded to the unit that is specified by the format model fmt. If the format model fmt is omitted, date is rounded to the nearest day. TRUNC(date[, 'fmt']): Returns date with the time portion of the day truncated to the unit that is specified by the format model fmt. If the format model fmt is omitted, date is truncated to the nearest day. 

The CONCAT Function The CONCAT function joins two character literals, columns, or expressions to yield one larger character expression. Numeric and date literals are implicitly cast as characters when they occur as parameters to the CONCAT function. Numeric or date expressions are evaluated before being converted to strings ready to be concatenated. The CONCAT function takes two parameters. Its syntax is CONCAT(s1, s2), where s1 and s2 represent string literals, character column values, or expressions resulting in character values. 

The INSTR(source string, search item, [start position], [nth occurrence of search item]) 

function returns a number that represents the position in the source string, beginning from 

the given start position, where the nth occurrence of the search item begins: 

instr('http://www.domain.com', '.', 1, 2) = 18 

The TRIM function literally trims off leading or trailing (or both) character strings from a 

given source string: