Oracle 1Z0-061 Online Practice
Questions and Exam Preparation
1Z0-061 Exam Details
Exam Code
:1Z0-061
Exam Name
:Oracle Database 12c: SQL Fundamentals
Certification
:Oracle Certifications
Vendor
:Oracle
Total Questions
:339 Q&As
Last Updated
:Oct 10, 2022
Oracle 1Z0-061 Online Questions &
Answers
Question 181:
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?
A. 1-a, 2-b, 3-c, and 4-d B. 1-c, 2-d, 3-a, and 4-b C. 1-c, 2-a, 3-b, and 4-d D. 1-d, 2-b, 3-a, and 4-c
C. 1-c, 2-a, 3-b, and 4-d
Question 182:
What are two reasons to create synonyms? (Choose two.)
A. You have too many tables. B. Your tables names are too long. C. Your tables have difficult names. D. You want to work on your own tables. E. You want to use another schema's tables. F. You have too many columns in your tables.
B. Your tables names are too long. C. Your tables have difficult names.
Create a synonyms when the names of the tables are too long or the table names are difficult.
Question 183:
See the Exhibit and examine the structure of ORD table: Exhibit:
Evaluate the following SQL statements that are executed in a user session in the specified order:
CREATE SEQUENCE ord_seq;
SELECT ord_seq.nextval
FROM dual;
INSERT INTO ord
VALUES (ord_seq.CURRVAL, '25-jan-2007, 101);
UPDATE ord
SET ord_no= ord_seq.NEXTVAL
WHERE cust_id =101;
What would be the outcome of the above statements?
A. All the statements would execute successfully and the ORD_NO column would contain the value 2 for the CUST_ID 101. B. The CREATE SEQUENCE command would not execute because the minimum value and maximum value for the sequence have not been specified. C. The CREATE SEQUENCE command would not execute because the starting value of the sequence and the increment value have not been specified. D. All the statements would execute successfully and the ORD_NO column would have the value 20 for the CUST_ID 101 because the default CACHE value is 20.
A. All the statements would execute successfully and the ORD_NO column would contain the value 2 for the CUST_ID 101.
Question 184:
Examine the structure of the EMPLOYEES table:
Which INSERT statement is valid?
A. INSERT INTO employees (employee_id, first_name, last_name, hire_date)VALUES ( 1000, `John', `Smith', `01/01/01'); B. INSERT INTO employees(employee_id, first_name, last_name, hire_date)VALUES ( 1000, `John', `Smith', '01 January 01'); C. INSERT INTO employees(employee_id, first_name, last_name, Hire_date)VALUES ( 1000, `John', `Smith', To_date(`01/01/01')); D. INSERT INTO employees(employee_id, first_name, last_name, hire_date)VALUES ( 1000, `John', `Smith', 01-Jan-01);
D. INSERT INTO employees(employee_id, first_name, last_name, hire_date)VALUES ( 1000, `John', `Smith', 01-Jan-01);
It is the only statement that has a valid date; all other will result in an error. Answer A is incorrect, syntax error, invalid date format
Question 185:
View the exhibit and examine the description for the SALES and CHANNELS tables.
You issued the following SQL statement to insert a row in the SALES table:
INSERT INTO sales VALUES
(23, 2300, SYSDATE, (SELECT channel_id
FROM channels
WHERE channel_desc='Direct Sales'), 12, 1, 500);
Which statement is true regarding the execution of the above statement?
A. The statement will execute and the new row will be inserted in the SALES table. B. The statement will fail because subquery cannot be used in the VALUES clause. C. The statement will fail because the VALUES clause is not required with subquery. D. The statement will fail because subquery in the VALUES clause is not enclosed with in single quotation marks.
A. The statement will execute and the new row will be inserted in the SALES table.
Question 186:
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
C. LEFT OUTER JOIN
Question 187:
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.
A. In a character sort, the values are case-sensitive.
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.
Question 188:
Which SQL statements would display the value 1890.55 as $1, 890.55? (Choose three.)
A. SELECT TO_CHAR(1890.55, '$0G000D00')FROM DUAL; B. SELECT TO_CHAR(1890.55, '$9, 999V99')FROM DUAL; C. SELECT TO_CHAR(1890.55, '$99, 999D99')FROM DUAL; D. SELECT TO_CHAR(1890.55, '$99G999D00')FROM DUAL; E. SELECT TO_CHAR(1890.55, '$99G999D99')FROM DUAL;
A. SELECT TO_CHAR(1890.55, '$0G000D00')FROM DUAL; D. SELECT TO_CHAR(1890.55, '$99G999D00')FROM DUAL; E. SELECT TO_CHAR(1890.55, '$99G999D99')FROM DUAL;
Question 189:
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
Which three statements insert a row into the table? (Choose three.)
A. INSERT INTO employees VALUES ( NULL, 'John', 'Smith'); B. INSERT INTO employees( first_name, last_name) VALUES( 'John', 'Smith'); C. INSERT INTO employees VALUES ( 1000, 'John', NULL); D. INSERT INTO employees (first_name, last_name, employee_id) VALUES ( 1000, 'John', 'Smith'); E. INSERT INTO employees (employee_id) VALUES (1000); F. INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'John', ' ');
C. INSERT INTO employees VALUES ( 1000, 'John', NULL); E. INSERT INTO employees (employee_id) VALUES (1000); F. INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'John', ' ');
EMPLOYEE_ID is a primary key. Incorrect answer:
A. EMPLOYEE_ID cannot be null
B. EMPLOYEE_ID cannot be null
D. mismatch of field_name with datatype
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-11
Question 190:
Which statements are true regarding the FOR UPDATE clause in a SELECT statement? (Choose all that apply.)
A. It locks only the columns specified in the SELECT list. B. It locks the rows that satisfy the condition in the SELECT statement. C. It can be used only in SELECT statements that are based on a single table. D. It can be used in SELECT statements that are based on a single or multiple tables. E. After it is enforced by a SELECT statement, no other query can access the same rows until a COMMIT or ROLLBACK is issued.
B. It locks the rows that satisfy the condition in the SELECT statement. D. It can be used in SELECT statements that are based on a single or multiple tables.
FOR UPDATE Clause in a SELECT Statement Locks the rows in the EMPLOYEES table where job_id is SA_REP. Lock is released only when you issue a ROLLBACK or a COMMIT. If the SELECT statement attempts to lock a row that is locked by another user, the database waits until the row is available, and then returns the results of the SELECT statement. FOR UPDATE Clause in a SELECT Statement When you issue a SELECT statement against the database to query some records, no locks are placed on the selected rows. In general, this is required because the number of records locked at any given time is (by default) kept to the absolute minimum: only those records that have been changed but not yet committed are locked. Even then, others will be able to read those records as they appeared before the change (the "before image" of the data). There are times, however, when you may want to lock a set of records even before you change them in your program. Oracle offers the FOR UPDATE clause of the SELECT statement to perform this locking. When you issue a SELECT...FOR UPDATE statement, the relational database management system (RDBMS) automatically obtains exclusive row-level locks on all the rows identified by the SELECT statement, thereby holding the records "for your changes only." No one else will be able to change any of these records until you perform a ROLLBACK or a COMMIT. You can append the optional keyword NOWAIT to the FOR UPDATE clause to tell the Oracle server not to wait if the table has been locked by another user. In this case, control will be returned immediately to your program or to your SQL Developer environment so that you can perform other work, or simply wait for a period of time before trying again. Without the NOWAIT clause, your process will block until the table is available, when the locks are released by the other user through the issue of a COMMIT or a ROLLBACK command.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Oracle exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your 1Z0-061 exam preparations
and Oracle certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.