Oracle Database - OCA Certification (1Z0-071) Exam (2018-06-30)
Oracle Database - OCA Certification (1Z0-071) Exam (2018-06-30)
Oracle Database - OCA Certification (1Z0-071) Exam (2018-06-30)
Oracle Database
1Z0-071 Exam
Exam A
QUESTION 1
You execute the following commands:
SQL > DEFINE hiredate = '01-APR-2011'
SQL >SELECT employee_id, first_name, salary
FROM employees
WHERE hire_date > '&hiredate'
AND manager_id > &mgr_id;
For which substitution variables are you prompted for the input?
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 2
View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables.
ORDER_ID is the primary key in the ORDERS table. It is also the foreign key in the ORDER_ITEMS table wherein it is created with the ON DELETE CASCADE option.
Which DELETE statement would execute successfully?
A. DELETE orders o, order_items I
WHERE o.order_id = i.order_id;
B. DELETE FROM orders WHERE (SELECT order_id
FROM order_items);
C. DELETE orders
WHERE order_total < 1000;
D. DELETE order_id
FROM orders
WHERE order_total < 1000;
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 3
View the Exhibit and examine the structure of CUSTOMERS table.
Using the CUSTOMERS table, you need to generate a report that shows an increase in the credit limit by 15% for all customers. Customers whose credit limit has not
been entered should have the message "Not Available" displayed.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 4
View the exhibit and examine the structures of the EMPLOYEES and DEPARTMENTS tables.
EMPLOYEES
Name Null? Type
----------------- ----- -------------
EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
HIRE_DATE NOT NULL DATE
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(10,2)
COMMISSION NUMBER(6,2)
MANAGER_ID NUMBER(6)
DEPARTMENT_ID NUMBER(4)
DEPARTMENTS
Name Null? Type
----------------- ----- -------------
DEPARTMENT_ID NOT NULL NUMBER(4)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
MANAGER_ID NUMBER(6)
LOCATION_ID NUMBER(4)
What is outcome?
A. It generates an error because multiple columns (SALARY, COMMISSION) cannot be specified together in an UPDATE statement.
B. It generates an error because a subquery cannot have a join condition in a UPDATE statement.
C. It executes successfully and gives the desired update
D. It executes successfully but does not give the desired update
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 5
Evaluate the following two queries:
SQL> SELECT cust_last_name, cust_city
FROM customers
WHERE cust_credit_limit IN (1000, 2000, 3000);
A. Performance would improve in query 2 only if there are null values in the CUST_CREDIT_LIMIT column.
B. There would be no change in performance.
C. Performance would degrade in query 2.
D. Performance would improve in query 2.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
References:
http://oraclexpert.com/restricting-and-sorting-data/
QUESTION 6
Examine the business rule:
Each student can work on multiple projects and each project can have multiple students.
You need to design an Entity Relationship Model (ERD) for optimal data storage and allow for generating reports in this format:
STUDENT_ID FIRST_NAME LAST_NAME PROJECT_ID PROJECT_NAME PROJECT_TASK
A. The ERD must have a 1:M relationship between the STUDENTS and PROJECTS entities.
B. The ERD must have a M:M relationship between the STUDENTS and PROJECTS entities that must be resolved into 1:M relationships.
C. STUDENT_ID must be the primary key in the STUDENTS entity and foreign key in the PROJECTS entity.
D. PROJECT_ID must be the primary key in the PROJECTS entity and foreign key in the STUDENTS entity.
E. An associative table must be created with a composite key of STUDENT_ID and PROJECT_ID, which is the foreign key linked to the STUDENTS and
PROJECTS entities.
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
References: http://www.oracle.com/technetwork/issue-archive/2011/11-nov/o61sql-
512018.html
QUESTION 7
View the Exhibit and examine the details of PRODUCT_INFORMATION table.
PRODUCT_NAME CATEGORY_ID SUPPLIER_ID
Inkjet C/8/HQ 12 102094
Inkjet C/4 12 102090
LaserPro 600/6/BW 12 102087
LaserPro 1200/8/BW 12 102099
Inkjet B/6 12 102096
Industrial 700/ID 12 102086
Industrial 600/DQ 12 102088
Compact 400/LQ 12 102087
Compact 400/DQ 12 102088
HD 12GB /R 13 102090
HD 10GB /I 13 102071
HD 12GB @7200 /SE 13 102057
HD 18.2GB @10000 /E 13 102078
HD 18.2GB @10000 /I 13 102050
HD 18GB /SE 13 102083
HD 6GB /I 13 102072
HD 8.2GB@5400 13 102093
You have the requirement to display PRODUCT_NAME from the table where the CATEGORY_ID column has values 12 or 13, and the SUPPLIER_ID column has the
value 102088. You executed the following SQL statement:
SELECT product_name
FROM product_information
WHERE (category_id = 12 AND category_id = 13) AND supplier_id = 102088;
A. It would not execute because the same column has been used in both sides of the AND logical operator to form the condition.
B. It would not execute because the entire WHERE clause condition is not enclosed within the parentheses.
C. It would execute and the output would display the desired result.
D. It would execute but the output would return no rows.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 8
Which two statements are true regarding the EXISTS operator used in the correlated subqueries? (Choose two.)
A. The outer query stops evaluating the result set of the inner query when the first value is found.
B. It is used to test whether
/ the values retrieved by the inner query exist in the result of the outer query.
C. It is used to test whether the values retrieved by the outer query exist in the result set of the inner query.
D. The outer query continues evaluating the result set of the inner query until all the values in the result set are processed.
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
References:
http://www.techonthenet.com/oracle/exists.php
QUESTION 9
View the exhibit and examine the structure of the STORES table.
STORES table
Name Null? Type
----------------- ----- -------------
STORE_ID NUMBER
NAME VARCHAR2(100)
ADDRESS VARCHAR2(200)
CITY VARCHAR2(100)
COUNTRY VARCHAR2(100)
START_DATE DATE
END_DATE DATE
PROPERTY_PRICE NUMBER
You want to display the NAME of the store along with the ADDRESS, START_DATE, PROPERTY_PRICE, and the projected property price, which is 115% of property
price.
The stores displayed must have START_DATE in the range of 36 months starting from 01-Jan-2000 and above.
Which SQL statement would get the desired output?
A. SELECT name, concat (address| | ','| |city| |', ', country) AS full_address,
start_date,
property_price, property_price*115/100
FROM stores
WHERE MONTHS_BETWEEN (start_date, '01-JAN-2000') <=36;
B. SELECT name, concat (address| | ','| |city| |', ', country) AS full_address,
start_date,
property_price, property_price*115/100
FROM stores
WHERE TO_NUMBER(start_date-TO_DATE('01-JAN-2000','DD-MON-RRRR')) <=36;
C. SELECT name, address||','||city||','||country AS full_address, start_date,
property_price, property_price*115/100
FROM stores
WHERE MONTHS_BETWEEN (start_date, TO_DATE('01-JAN-2000','DD-MON-RRRR')) <=36;
D. SELECT name, concat (address||','| |city| |', ', country) AS full_address,
start_date,
property_price, property_price*115/100
FROM stores
WHERE MONTHS_BETWEEN (start_date, TO_DATE('01-JAN-2000','DD-MON-RRRR')) <=36;
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 10
The BOOKS_TRANSACTIONS table exists in your database.
A. The execution fails unless the numeral 3 in the ORDER BY clause is replaced by a column name.
B. Rows are displayed in the order that they are stored in the table only for the three rows with the lowest values in the key column.
C. Rows are displayed in the order that they are stored in the table only for the first three rows.
D. Rows are displayed sorted in ascending order of the values in the third column in the table.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 11
Examine the command:
SQL> ALTER TABLE books_transactions
ADD CONSTRAINT fk_book_id FOREIGN KEY (book_id)
REFERENCES books (book_id) ON DELETE CASCADE;
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 12
View the exhibit and examine the structure of the EMPLOYEES table.
You want to display all employees and their managers having 100 as the MANAGER_ID. You want the output in two columns: the first column would have the
LAST_NAME of the managers and the second column would have LAST_NAME of the employees.
Explanation/Reference:
QUESTION 13
Which three statements are true about multiple-row subqueries?
Explanation/Reference:
QUESTION 14
Examine the structure of the EMPLOYEES table.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 15
Which normal form is a table in if it has no multi-valued attributes and no partial
dependencies?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
References: https://blog.udemy.com/database-normal-
forms/
QUESTION 16
Sales data of a company is stored in two tables, SALES1 and SALES2, with some data being duplicated across the tables. You want to display the results from the
SALES1 table, which are not present in the SALES2 table.
SALES1 table
Name Null Type
------------------ ------------- ----------------
SALES_ID NUMBER
STORE_ID NUMBER
ITEMS_ID NUMBER
QUANTITY NUMBER
SALES_DATE DATE
SALES2 table
Name Null Type
---------------- ------------- -----------------
SALES_ID NUMBER
STORE_ID NUMBER
ITEMS_ID NUMBER
QUANTITY NUMBER
SALES_DATE DATE
A. INTERSECT
B. UNION
C. PLUS
D. MINUS
E. SUBTRACT
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries004.htm
QUESTION 17
Evaluate the following ALTER TABLE statement:
A. After executing the ALTER TABLE command, you can add a new column called ORDER_DATE to the ORDERS table.
B. The ORDER_DATE column should be empty for the ALTER TABLE command to execute succsessfully.
C. ROLLBACK can be used to get back the ORDER_DATE column in the ORDERS table.
D. The DESCRIBE command would still display the ORDER_DATE column.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 18
Evaluate the following SQL statements that are issued in the given order:
CREATE TABLE emp
(emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY, ename
VARCHAR2(15), salary NUMBER (8,2), mgr_no NUMBER(2) CONSTRAINT
emp_mgr_fk REFERENCES emp(emp_no));
ALTER TABLE emp
DISABLE CONSTRAINT emp_emp_no_pk CASCADE;
A. It would remain disabled and can be enabled only by dropping the foreign key constraint and recreating it.
B. It would remain disabled and has to be enabled manually using the ALTER TABLE command.
C. It would be automatically enabled and immediate.
D. It would be automatically enabled and deferred.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 19
Which three statements are true regarding the data types?
A. The minimum column width that can be specified for a VARCHAR2 data type column is one.
B. Only one LONG column can be used per table.
C. A TIMESTAMP data type column stores only time values with fractional seconds.
D. The BLOB data type column is used to store binary data in an operating system file.
E. The value for a CHAR data type column is blank-padded to the maximum defined column width.
Explanation/Reference:
QUESTION 20
Which three statements are true regarding subqueries?
A. Multiple columns or expressions can be compared between the main query and subquery.
B. Subqueries can contain ORDER BY but not the GROUP BY clause.
C. Main query and subquery can get data from different tables.
D. Subqueries can contain GROUP BY and ORDER BY clauses.
E. Main query and subquery must get data from the same tables.
F. Only one column or expression can be compared between the main query and subquery.
Explanation/Reference:
References:
http://docs.oracle.com/javadb/10.6.2.1/ref/rrefsqlj13658.html
QUESTION 21
Which statement is true regarding the default behavior of the ORDER BY clause?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 22
Which task can be performed by using a single Data Manipulation Language (DML) statement?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 23
Examine the structure of the BOOKS_TRANSACTIONS table:
You want to display the member IDs, due date, and late fee as $2 for all transactions.
Which SQL statement must you execute?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 24
In which three situations does a transaction complete?
QUESTION 25
View the exhibit and examine the data in ORDERS_MASTER and MONTHLY_ORDERS tables.
ORDERS_MASTER
ORDER_ID ORDER_TOTAL
1 1000
2 2000
3 3000
4
MONTHLY_ORDERS
ORDER_ID ORDER_TOTAL
2 2500
3
MERGE_INTO orders_master o
USING monthly_orders m
ON (o.order_id = m.order_id)
WHEN MATCHED THEN
UPDATE SET o.order_total = m.order_total
DELETE WHERE (m.order_total IS NULL)
WHEN NOT MATCHED THEN
INSERT VALUES (m.order_id, m.order_total)
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
References:
https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9016.htm
QUESTION 26
Evaluate the following SQL statement:
SELECT product_name || 'it's not available for order'
FROM product_information
WHERE product_status = 'obsolete';
You received the following error while executing the above query:
ERROR
ORA-01756: quoted string not properly terminated
A. Use Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character string.
B. Enclose the literal character string in the SELECT clause within the double quotation marks.
C. Do not enclose the character literal string in the SELECT clause within the single quotation marks.
D. Use escape character to negate the single quotation mark inside the literal character string in the SELECT clause.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
References:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm
QUESTION 27
View the exhibit and examine the ORDERS table.
ORDERS
Name Null? Type
ORDER ID NOT NULL NUMBER(4)
ORDATE DATE DATE
CUSTOMER ID NUMBER(3)
The ORDERS table contains data and all orders have been assigned a customer ID. Which statement would add a NOT NULL constraint to the CUSTOMER_ID
column?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 28
Examine the structure of the INVOICE table.
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 29
Which three statements are true about the ALTER TABLE....DROP COLUMN.... command?
Explanation/Reference:
QUESTION 30
View the exhibit and examine the description of the PRODUCT_INFORMATION table.
Which SQL statement would retrieve from the table the number of products having LIST_PRICE as NULL?
Explanation/Reference:
QUESTION 31
Which three tasks can be performed using SQL functions built into Oracle Database?
Explanation/Reference:
QUESTION 32
The user SCOTT who is the owner of ORDERS and ORDER_ITEMS tables issues the following GRANT command:
GRANT ALL
ON orders, order_items
TO PUBLIC;
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
References:
http://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljgrant.html
QUESTION 33
You are designing the structure of a table in which two columns have the specifications:
COMPONENT_ID – must be able to contain a maximum of 12 alphanumeric characters and uniquely identify the row
EXECUTION_DATETIME – contains Century, Year, Month, Day, Hour, Minute, Second to the maximum precision and is used for calculations and comparisons
between components.
Which two options define the data types that satisfy these requirements most efficiently?
Correct Answer: CF
Section: (none)
Explanation
Explanation/Reference:
QUESTION 34
You want to display the date for the first Monday of the next month and issue the following command:
SQL>SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE), 'MON'),
'dd "is the first Monday for" fmmonth rrrr')
FROM DUAL;
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 35
Which two statements are true regarding the GROUP BY clause in a SQL statement? (Choose two.)
Correct Answer: DE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 36
Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS:
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 37
View the exhibit and examine the description of the DEPARTMENTS and EMPLOYEES tables.
The retrieve data for all the employees for their EMPLOYEE_ID, FIRST_NAME, and DEPARTMENT NAME, the following SQL statement was written:
www.vceplus.com - VCE Exam Simulator - Download A+ VCE (latest) free Open VCE Exams - VCE to PDF Converter - PDF Online
NATURAL JOIN departments;
The desired output is not obtained after executing the above SQL statement. What could be the reason for this?
A. The table prefix is missing for the column names in the SELECT clause.
B. The NATURAL JOIN clause is missing the USING clause.
C. The DEPARTMENTS table is not used before the EMPLOYEES table in the FROM clause.
D. The EMPLOYEES and DEPARTMENTS tables have more than one column with the same column name and data type.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
Explanation:
Natural join needs only one column to be the same in each table. The EMPLOYEES and DEPARTMENTS tables have two columns that are the same (Department_ID
and Manager_ID)
QUESTION 38
Which two statements are true about sequences created in a single instance database? (Choose two.)
A. When the MAXVALUE limit for the sequence is reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement.
B. DELETE <sequencename> would remove a sequence from the database.
C. The numbers generated by a sequence can be used only for one table.
D. CURRVAL is used to refer to the last sequence number that has been generated.
E. When a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be available once again when the
database instance is restarted.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
References:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_2012.htm#SQLRF00817
https://docs.oracle.com/cd/A84870_01/doc/server.816/a76989/ch26.htm
QUESTION 39
View the exhibit and examine the structure of the CUSTOMERS table.
Which two tasks would require subqueries or joins to be executed in a single statement?
A. finding the number of customers, in each city, whose credit limit is more than the average credit limit of all the customers
B. finding the average credit limit of male customers residing in 'Tokyo' or 'Sydney'
C. listing of customers who do not have a credit limit and were born before 1980
D. finding the number of customers, in each city, who’s marital status is 'married'.
E. listing of those customers, whose credit limit is the same as the credit limit of customers residing in the city 'Tokyo'.
Correct Answer: AE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 40
Which statement is true about transactions?
A. A set of Data Manipulation Language (DML) statements executed in a sequence ending with a SAVEPOINT forms a single transaction.
B. Each Data Definition Language (DDL) statement executed forms a single transaction.
C. A set of DDL statements executed in a sequence ending with a COMMIT forms a single transaction.
D. A combination of DDL and DML statements executed in a sequence ending with a COMMIT forms a single transaction.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
References:
https://docs.oracle.com/database/121/CNCPT/transact.htm#CNCPT038
QUESTION 41
The first DROP operation is performed on PRODUCTS table using the following command:
Then you performed the FLASHBACK operation by using the following command:
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9003.htm
QUESTION 42
The following are the steps for a correlated subquery, listed in random order:
1. The WHERE clause of the outer query is evaluated.
2. The candidate row is fetched from the table specified in the outer query.
3. This is repeated for the subsequent rows of the table, till all the rows are processed.
4. Rows are returned by the inner query, after being evaluated with the value from the candidate row in the outer query.
Which is the correct sequence in which the Oracle server evaluates a correlated subquery?
A. 2, 1, 4, 3 B.
4, 1, 2, 3 C. 4,
2, 1, 3
D. 2, 4, 1, 3
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
References: http://rajanimohanty.blogspot.co.uk/2014/01/correlated-
subquery.html
QUESTION 43
Evaluate the following query:
SQL> SELECT TRUNC (ROUND(156.00, -1),-1)
FROM DUAL;
A. 150 B.
200
C. 160
D. 16
E. 100
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions135.htm
https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2127.htm
QUESTION 44
Examine the data in the CUST_NAME column of the CUSTOMERS table.
CUST_NAME
-------------------
Renske Ladwig
Jason Mallin
Samuel McCain
Allan MCEwen
Irene Mikilineni
Julia Nayer
You need to display customers' second names where the second name starts with "Mc" or "MC".
Which query gives the required output?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 45
View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.
The PROD_ID column is the foreign key in the SALES tables, which references the PRODUCTS table.
Similarly, the CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively.
A. The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.
B. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
C. The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
D. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 46
Evaluate the following SELECT statement and view the exhibit to examine its output:
ORDER PK P ENABLED
Which two statements are true about the output? (Choose two.)
A. The R_CONSTRAINT_NAME column gives the alternative name for the constraint.
B. In the second column, 'c' indicates a check constraint.
C. The STATUS column indicates whether the table is currently in use.
D. The column DELETE_RULE decides the state of the related rows in the child table when the corresponding row is deleted from the parent table.
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 47
Which three statements are true regarding group functions? (Choose three.)
Explanation/Reference:
References: https://www.safaribooksonline.com/library/view/mastering-oracle-
sql/0596006322/ch04.html
QUESTION 48
Which statements are true? (Choose all that apply.)
A. The data dictionary is created and maintained by the database administrator.
B. The data dictionary views consists of joins of dictionary base tables and user-defined tables.
C. The usernames of all the users including the database administrators are stored in the data dictionary.
D. The USER_CONS_COLUMNS view should be queried to find the names of the columns to which a constraint applies.
E. Both USER_OBJECTS and CAT views provide the same information about all the objects that are owned by the user.
F. Views with the same name but different prefixes, such as DBA, ALL and USER, use the same base tables from the data dictionary.
Explanation/Reference:
References:
https://docs.oracle.com/cd/B10501_01/server.920/a96524/c05dicti.htm
QUESTION 49
View the exhibits and examine the structures of the COSTS and PROMOTIONS tables.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 50
View the exhibit and examine the descriptions of the DEPT and LOCATIONS tables.
You want to update the CITY column of the DEPT table for all the rows with the corresponding value in the CITY column of the LOCATIONS table for each
department.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 51
The BOOKS_TRANSACTIONS table exists in your schema in this database.
You execute this SQL statement when connected to your schema in your database instance.
SQL> SELECT * FROM books_transactions ORDER BY 3;
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 52
Which statement is true about Data Manipulation Language (DML)?
A. DML automatically disables foreign ley constraints when modifying primary key values in the parent table.
B. Each DML statement forms a transaction by default.
C. A transaction can consist of one or more DML statements.
D. DML disables foreign key constraints when deleting primary key values in the parent table, only when the ON DELETE CASCADE option is set for the foreign
key constraint.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 53
View the exhibit and examine the structure of the PROMOTIONS table.
You have to generate a report that displays the promo name and start date for all promos that started after the last promo in the ‘INTERNET’ category.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 54
Which two statements are true about sequences crated in a single instance Oracle database?
A. The numbers generated by an explicitly defined sequence can only be used to insert data in one table.
B. DELETE <sequencename> would remove a sequence from the database.
C. CURRVAL is used to refer to the most recent sequence number that has been generated for a particular sequence.
D. When the MAXVALUE limit for a sequence is reached, it can be increased by using the ALTER SEQUENCE statement.
E. When the database instance shuts down abnormally, sequence numbers that have been cached but not used are available again when the instance is
restarted.
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 55
Evaluate the following CREATE TABLE command:
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 56
Using the CUSTOMERS table, you need to generate a report that shows 50% of each credit amount in each income level. The report should NOT show any repeated
credit amounts in each income level.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 57
Which three statements are true regarding the SQL WHERE and HAVING clauses?
Explanation/Reference:
QUESTION 58
You need to display the date 11-oct-2007 in words as ‘Eleventh of October, Two Thousand Seven’.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 59
Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS:
You want to generate a report that shows all course IDs irrespective of whether they have corresponding department IDs or not but no department IDs if they do
not have any courses.
A. SELECT course_id, department_id, FROM department_details d RIGHT OUTER JOIN course_details c USING (department_id)
B. SELECT c.course_id, d.department_id FROM course_details c RIGHT OUTER JOIN .department_details d ON
(c.depatrment_id=d.department_id)
C. SELECT c.course_id, d.department_id FROM course_details c FULL OUTER JOIN department_details d ON (c.department_id=d.
department_id)
D. SELECT c.course_id, d.department_id FROM course_details c FULL OUTER JOIN department_details d ON
(c.department_id<>d. department_id)
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 60
View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.
The PROD_ID column is the foreign key in the SALES table referencing the PRODUCTS table.
The CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively.
Examine this command:
CREATE TABLE new_sales (prod_id, cust_id, order_date DEFAULT SYSDATE)
AS
SELECT prod_id, cust_id, time_id
FROM sales;
A. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the selected columns from the SALES table would be created on the
corresponding columns in the NEW_SALES table.
B. The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
C. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
D. The NEW_SALES table would get created and all the NOT NULL constraints defined on the selected columns from the SALES table would be created on the
corresponding columns in the NEW_SALES table.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 61
View the Exhibit and examine the structure of the ORDERS table. The ORDER_ID column is the PRIMARY KEY in the ORDERS table.
Evaluate the following CREATE TABLE command:
CREATE TABLE new_orders(ord_id, ord_date DEFAULT SYSDATE, cus_id)
AS
SELECT order_id.order_date,customer_id
FROM orders;
A. The NEW_ODRDERS table would not get created because the DEFAULT value cannot be specified in the column definition.
B. The NEW_ODRDERS table would get created and only the NOT NULL constraint defined on the specified columns would be passed to the new table.
C. The NEW_ODRDERS table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
D. The NEW_ODRDERS table would get created and all the constraints defined on the specified columns in the ORDERS table would be passed to the new table.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 62
Evaluate the following statement.
INSERT ALL
WHEN order_total < 10000 THEN
INTO small_orders
WHEN order_total > 10000 AND order_total < 20000 THEN
INTO medium_orders
WHEN order_total > 200000 THEN
INTO large_orders
SELECT order_id, order_total, customer_id
FROM orders;
Which statement is true regarding the evaluation of rows returned by the subquery in the INSERT statement?
A. Each row is evaluated by the first WHEN clause and if the condition is false then the row would be evaluated by the subsequent when clauses.
B. All rows are evaluated by all the three WHEN clauses.
C. Each row is evaluated by the first WHEN clause and if the condition is true, then the row would be evaluated by the subsequent when clauses.
D. The INSERT statement will return an error because the ELSE clause is missing.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 63
Which two statements are true regarding the SQL GROUP BY clause?
Correct Answer: DE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 64
Examine the structure of the BOOKS_TRANSACTIONS table:
You want to display the member IDs, due date, and late fee as $2 for all transactions.
A. SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", $2 AS "LATE FEE" FROM BOOKS_TRANSACTIONS
B. SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", '$2' AS "LATE FEE" FROM BOOKS_TRANSACTIONS
C. SELECT member_id 'MEMBER ID', due_date 'DUE DATE', '$2 AS LATE FEE' FROM BOOKS_TRANSACTIONS;
D. SELECT member_id AS MEMBER_ID, due_date AS DUE_DATE, $2 AS LATE_FEE FROM BOOKS_TRANSACTIONS
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 65
You issue this command which succeeds:
SQL> DROP TABLE products;
A. All existing views and synonyms that refer to the table are invalidated but retained.
B. Any uncommitted transaction in the session is committed.
C. Table data and the table structure are deleted.
D. All the table’s indexes if any exist, are invalidated but retained.
E. Table data is deleted but the table structure is retained.
Explanation/Reference:
QUESTION 66
View the Exhibit and examine the description of the ORDERS table. (Choose two.)
Which two WHERE clause conditions demonstrate the correct usage of conversion functions?
A. WHERE Order_date_IN ( TO_DATE('OCT 21 2003', 'MON DD YYYY'), TO_CHAR('NOV 21 2003', 'MON DD YYYY') )
B. WHERE Order_date > TO_CHAR(ADD_MONTHS(SYSDATE, 6), 'MON DD YYYY')
C. WHERE TO_CHAR(Order_date, 'MON DD YYYY') = 'JAN 20 2003'
D. WHERE Order_date > ( TO_DATE('JUL 10 2006', 'MON DD YYYY')
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 67
Which three arithmetic operations can be performed on a column by using a SQL function that is built into Oracle database? (Choose three.)
Explanation/Reference:
QUESTION 68
View the Exhibit and examine the structure of the EMPLOYEES and JOB_HISTORY tables. (Choose all that apply.)
Examine this query which must select the employee IDs of all the employees who have held the job SA_MAN at any time during their employment.
SELECT EMPLOYEE_ID
FROM EMPLOYEES
WHERE JOB_ID = 'SA_MAN'
-------------------------------------
SELECT EMPLOYEE_ID
FROM JOB_HISTORY
WHERE JOB_ID = 'SA_MAN';
Choose two correct SET operators which would cause the query to return the desired result.
A. UNION
B. MINUS
C. INTERSECT
D. UNION ALL
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 69
You must create a SALES table with these column specifications and data types: (Choose the best answer.)
SALESID: Number
STOREID: Number
ITEMID: Number
QTY: Number, should be set to 1 when no value is specified
SLSDATE: Date, should be set to current date when no value is specified
PAYMENT: Characters up to 30 characters, should be set to CASH when no value is specified
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 70
View the Exhibit and examine the details of the PRODUCT_INFORMATION table. (Choose two.)
Evaluate this SQL statement:
SELECT TO_CHAR (list_price, '$9,999')
From product_information;
A. A row whose LIST_PRICE column contains value 11235.90 would be displayed as #######.
B. A row whose LIST_PRICE column contains value 1123.90 would be displayed as $1,123.
C. A row whose LIST_PRICE column contains value 1123.90 would be displayed as $1,124.
D. A row whose LIST_PRICE column contains value 11235.90 would be displayed as $1,123.
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 71
Which statement is true about SQL query processing in an Oracle database instance? (Choose the best answer.)
A. During parsing, a SQL statement containing literals in the WHERE clause that has been executed by any session and which is cached in memory, is always
reused for the current execution.
B. During executing, the oracle server may read data from storage if the required data is not already in memory.
C. During row source generation, rows that satisfy the query are retrieved from the database and stored in memory.
D. During optimization, execution plans are formulated based on the statistics gathered by the database instance, and the lowest cost plan is selected for
execution.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 72
Examine the structure of the ORDERS table: (Choose the best answer.)
You want to find the total value of all the orders for each year and issue this command:
SQL> SELECT TO_CHAR(order_date,'rr'), SUM(order_total) FROM orders
GROUP BY TO_CHAR(order_date, 'yyyy');
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 73
View the Exhibit and examine the structure of the ORDER_ITEMS table. (Choose the best answer.)
You must select the ORDER_ID of the order that has the highest total value among all the orders in the ORDER_ITEMS table.
A. SELECT order_id
FROM order_items
GROUP BY order_id
HAVING SUM(unit_price*quantity) = (SELECT MAX (SUM(unit_price*quantity))
FROM order_items GROUP BY order_id);
B. SELECT order_id
FROM order_items
WHERE(unit_price*quantity) = (SELECT MAX (SUM(unit_price*quantity)
FROM order_items) GROUP BY order_id);
C. SELECT order_id
FROM order_items
WHERE(unit_price*quantity) = MAX(unit_price*quantity)
GROUP BY order_id);
D. SELECT order_id
FROM order_items
WHERE (unit_price*quantity) = (SELECT MAX(unit_price*quantity)
FROM order_items
GROUP BY order_id)
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 74
View the Exhibit and examine the structure of the EMP table which is not partitioned and not an index-organized table. (Choose two.)
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 75
View the exhibit and examine the structure and data in the invoice table. (Choose two.)
Which two SQL statements would execute successfully?
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 76
Which two statements best describe the benefits of using the WITH clause? (Choose two.)
A. It can improve the performance of a large query by storing the result of a query block having the WITH clause in the session's temporary tablespace.
B. It enables sessions to reuse the same query block in a SELECT statement, if it occurs more than once in a complex query.
C. It enables sessions to store a query block permanently in memory and use it to create complex queries.
D. It enables sessions to store the results of a query permanently.
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 77
Which three statements are true regarding subqueries? (Choose three.)
Explanation/Reference:
QUESTION 78
Which two statements are true regarding single row functions? (Choose two.)
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 79
View the Exhibit and examine the structure of the ORDERS table. (Choose the best answer.)
You must select ORDER_ID and ORDER_DATE for all orders that were placed after the last order placed by CUSTOMER_ID 101.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 80
Examine the structure of the EMPLOYEES table. (Choose two.)
You must display the maximum and minimum salaries of employees hired 1 year ago.
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 81
Which two statements are true regarding subqueries? (Choose two.)
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 82
Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
A. The nested query executes after the outer query returns the row.
B. The nested query executes first and then the outer query executes.
C. The outer query executes only once for the result returned by the inner query.
D. Each row returned by the outer query is evaluated for the results returned by the inner query.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 83
Which two statement are true regarding table joins available in the Oracle Database server? (Choose two.)
A. You can use the ON clause to specify multiple conditions while joining tables.
B. You can explicitly provide the join condition with a NATURAL JOIN.
C. You can use the JOIN clause to join only two tables.
D. You can use the USING clause to join tables on more than one column.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 84
You issued this command:
CHOOSE THREE
SQL > DROP TABLE employees;
Explanation/Reference:
QUESTION 85
View the exhibit and examine the data in the PROJ_TASK_DETAILS table. (Choose the best answer.)
The PROJ_TASK_DETAILS table stores information about project tasks and the relation between them.
You must generate a report listing all task IDs, the task ID of any task upon which it depends and the name of the employee in charge of the task upon which it
depends.
Explanation/Reference:
QUESTION 86
View the Exhibit and examine the structure of the SALES and PRODUCTS tables. (Choose two.)
In the SALES table, PROD_ID is the foreign key referencing PROD_ID in the PRODUCTS table. You must list each product ID and the number of times it has been
sold.
Which two JOIN operations can be used to obtain the required output?
A. FULL OUTER JOIN B.
JOIN
C. LEFT OUETR JOIN
D. RIGHT OUTER JOIN
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 87
View the exhibit and examine the description of the EMPLOYEES table. (Choose two.)
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 88
Examine the structure of the SALES table. (Choose two.)
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 89
Examine this SELECT statement and view the Exhibit to see its output: (Choose two.)
A. The DELETE_RULE column indicates the desired state of related rows in the child table when the corresponding row is deleted from the parent table.
B. The R_CONSTRAINT_NAME column contains an alternative name for the constraint.
C. In the second column, 'c' indicates a check constraint.
D. The STATUS column indicates whether the table is currently in use.
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 90
Which two statements are true regarding constraints? (Choose two.)
A. All constraints can be defined at the column level and at the table level.
B. A constraint can be disabled even if the constraint column contains data.
C. A column with the UNIQUE constraint can contain NULLS.
D. A foreign key column cannot contain NULLS.
E. A constraint is enforced only for INSERT operations.
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference: