1Z0-061 Premium Bundle

1Z0-061 Premium Bundle

Oracle Database 12c SQL Fundamentals Certification Exam

4.5 
(33720 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 5, 2024Last update

Oracle 1Z0-061 Free Practice Questions

Q1. You want to create a table employees in which the values of columns EMPLOYEES_ID and LOGIN_ID must be unique and not null. Which two SQL statements would create the required table? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

F. Option F 

Answer: D,E 

Q2. View the Exhibit and examine the data in the promotions table. 

PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr. 

You need to produce a report that provides the name, cost, and start date of all promos in the post category that were launched before January 1, 2000. 

Which SQL statement would you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q3. View the Exhibit and examine the data in the products table. 

You need to display product names from the products table that belong to the 'software/other' category with minimum prices as either S2000 or S4000 and no unit of measure. 

You issue the following query: 

Which statement is true regarding the above query? 

A. It executes successfully but returns no result. 

B. It executes successfully and returns the required result. 

C. It generates an error because the condition specified for PROD_UNIT_OF_MEASURE is not valid. 

D. It generates an error because the condition specified for the prod category column is not valid. 

Answer:

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

Q5. Which statement is true regarding the default behavior of the order by clause? 

A. In a character sort, the values are case-sensitive. 

B. NULL values are not considered at all by the sort operation. 

C. Only those columns that are specified in the select list can be used in the order by clause. 

D. Numeric values are displayed from the maximum to the minimum value if they have decimal positions. 

Answer:

Explanation: 

Character Strings and Dates 

Character strings and date values are enclosed with single quotation marks. 

Character values are case-sensitive and date values are format-sensitive. 

The default date display format is DD-MON-RR. 

Q6. 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 

Q7. 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 

Q8. View the Exhibit and examine the data in the costs table. 

You need to generate a report that displays the IDs of all products in the costs table whose unit price is at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost. You issue the following query: 

Which statement is true regarding the above query? 

A. It executes and produces the required result. 

B. It produces an error because an expression cannot be used in the order by clause. 

C. It produces an error because the DESC option cannot be used with an expression in the order by clause. 

D. It produces an error because the expression in the ORDER by clause should also be specified in the SELECT clause. 

Answer:

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

A. INNER JOIN 

B. FULL OUTER JOIN 

C. LEFT OUTER JOIN 

D. RIGHT OUTER JOIN 

Answer:

Q10. Examine the structure of the employees table: 

There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID. 

You want to display the name, joining date, and manager for all the employees. Newly hired employees are yet to be assigned a department or a manager. For them, 'No Manager1 should be displayed in the manager column. 

Which SQL query gets the required output? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Reference: http://ivrainbow65.blogspot.com/ 

Q11. Which two statements are true regarding the count function? 

A. The count function can be used only for CHAR, VARCHAR2, and NUMBER data types. 

B. Count (*) returns the number of rows including duplicate rows and rows containing null value in any of the columns. 

C. Count (cust_id) returns the number of rows including rows with duplicate customer IDs and NULL value in the CUST_ID column. 

D. Count (distinct inv_amt) returns the number of rows excluding rows containing duplicates and NULL values in the INV_AMT column. 

E. A select statement using the COUNT function with a DISTINCT keyword cannot have a where clause. 

Answer: B,D 

Explanation: 

Using the COUNT Function 

The COUNT function has three formats: 

COUNT(*) 

COUNT(expr) 

COUNT(DISTINCT expr) 

COUNT(*) returns the number of rows in a table that satisfy the criteria of the SELECT 

statement, including duplicate rows and rows containing null values in any of the columns. 

If a WHERE clause is included in the SELECT statement, COUNT(*) returns the number of rows that satisfy the condition in the WHERE clause. 

In contrast, 

COUNT(expr) returns the number of non-null values that are in the column identified by expr. 

COUNT(DISTINCT expr) returns the number of unique, non-null values that are in the column identified by expr. 

Q12. You want to display 5 percent of the rows from the sales table for products with the lowest AMOUNT_SOLD and also want to include the rows that have the same AMOUNT_SOLD even if this causes the output to exceed 5 percent of the rows. 

Which query will provide the required result? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q13. Examine the structure of the products table: 

You want to display the names of the products that have the highest total value for UNIT_PRICE * QTY_IN_HAND. 

Which SQL statement gives the required output? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

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

Q15. In which three situations does a transaction complete? 

A. When a DELETE statement is executed 

B. When a ROLLBACK command is executed 

C. When a PL/SQL anonymous block is executed 

D. When a data definition language (DDL) statement is executed 

E. When a TRUNCATE statement is executed after the pending transaction 

Answer: B,D,E 

START 1Z0-061 EXAM