Oracle Testking 1z0-071 v2020-04-15 by Connor 207q
Oracle Testking 1z0-071 v2020-04-15 by Connor 207q
Oracle Testking 1z0-071 v2020-04-15 by Connor 207q
Number: 1z0-071
Passing Score: 800
Time Limit: 120 min
File Version: 1
1z0-071
https://www.gratisexam.com/
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Exam A
QUESTION 1
Which three statements are true regarding the WHERE and HAVING clauses in a SQL statement? (Choose three.)
https://www.gratisexam.com/
C. The HAVING clause conditions can use aliases for the columns.
D. The WHERE clause is used to exclude rows before the grouping of data.
E. The HAVING clause is used to exclude one or more aggregated results after grouping data.
Explanation/Reference:
QUESTION 2
Which statement is true regarding external tables?
A. The CREATE TABLE AS SELECT statement can be used to upload data into a normal table in the database from an external table.
B. The data and metadata for an external table are stored outside the database.
C. The default REJECT LIMIT for external tables is UNLIMITED.
D. ORACLE_LOADER and ORACLE_DATAPUMP have exactly the same functionality when used with an external table.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
References:
https://docs.oracle.com/cd/B28359_01/server.111/b28310/tables013.htm
QUESTION 3
Evaluate the following statement.
Which statement is true regarding the evaluation of rows returned by the subquery in the INSERT statement?
A. They are evaluated by all the three WHEN clauses regardless of the results of the evaluation of any other WHEN clause.
B. They are evaluated by the first WHEN clause. If the condition is true, then the row would be evaluated by the subsequent WHEN clauses.
C. They are evaluated by the first WHEN clause. If the condition is false, then the row would be evaluated by the subsequent WHEN clauses.
D. The insert statement would give an error because the ELSE clause is not present for support in case none of WHEN clauses are true.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
References:
http://psoug.org/definition/WHEN.htm
QUESTION 4
You issue the following command to drop the PRODUCTS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which three statements are true about the implication of this command? (Choose three.)
Explanation/Reference:
QUESTION 5
You execute the following commands:
For which substitution variables are you prompted for the input?
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 6
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?
Correct Answer: C
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 7
View the exhibit and examine the structures of the EMPLOYEES and DEPARTMENTS tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Set the employees' commission in location_id 2100 to 1.5 times the average commission of their department.
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 8
Examine the business rule:
Each student can work on multiple projects and each project can have multiple students.
You must design an Entity Relationship (ER) model for optimal data storage and allow for generating reports in this format:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
STUDENT_ID FIRST_NAME LAST_NAME PROJECT_ID PROJECT_NAME PROJECT_TASK
A. The ER must have a 1-to-many relationship between the STUDENTS and PROJECTS entities.
B. The ER must have a many-to-many relationship between the STUDENTS and PROJECTS entities that must be resolved into 1-to-many 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 9
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 10
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
View the exhibit and examine the structure of the STORES table.
You must display the NAME of stores 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;
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 11
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 12
Examine the command:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. When a row in the BOOKS table is deleted, the rows in the BOOK_TRANSACTIONS table whose BOOK_ID matches that of the deleted row in the BOOKS table are
also deleted.
D. When a value in the BOOKS.BOOK_ID column is deleted, the corresponding value is updated in the BOOKS_TRANSACTIONS.BOOK_ID column.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 13
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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
WHERE m.manager_id = 100;
B. SELECT m.last_name "Manager", e.last_name "Employee"
FROM employees m JOIN employees e
ON m.employee_id = e.manager_id
WHERE e.manager_id = 100;
C. SELECT m.last_name "Manager", e.last_name "Employee"
FROM employees m JOIN employees e
ON e.employee_id = m.manager_id
WHERE m.manager_id = 100;
D. SELECT m.last_name "Manager", e.last_name "Employee"
FROM employees m JOIN employees e
WHERE m.employee_id = e.manager_id AND e.manager_id = 100
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 14
Examine the structure of the EMPLOYEES table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
There is a parent/child relationship between EMPLOYEE_ID and MANAGER_ID.
You want to display the last names and manager IDs of employees who work for the same manager as the employee whose EMPLOYEE_ID is 123.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
WHERE e.employee_id = 123;
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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which set operator generates the required output?
A. INTERSECT
B. UNION
C. PLUS
D. MINUS
E. SUBTRACT
Correct Answer: D
Section: (none)
Explanation
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries004.htm
QUESTION 17
Evaluate the following SQL statements that are issued in the given order:
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 18
Which three statements are true regarding subqueries? (Choose three.)
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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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 19
Examine the structure of the MEMBERS table.
Which query can be used to display the last names and city names only for members from the states MO and MI?
A. SELECT last_name, city FROM members WHERE state ='MO' AND state ='MI';
B. SELECT last_name, city FROM members WHERE state LIKE 'M%';
C. SELECT last_name, city FROM members WHERE state IN ('MO', 'MI');
D. SELECT DISTINCT last_name, city FROM members WHERE state ='MO' OR state ='MI';
Correct Answer: C
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 20
Which statement is true about an inner join specified in a query’s WHERE clause?
https://www.gratisexam.com/
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 21
Which task can be performed by using a single Data Manipulation Language (DML) statement?
Correct Answer: C
Section: (none)
Explanation
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
QUESTION 22
Evaluate the following SQL statement:
You received the following error while executing the above query:
ERROR
ORA-01756: quoted string not properly terminated
A. Remove the single quotation marks enclosing the character literal string in the SELECT clause
B. Use the escape character to negate the single quotation mark within the literal character string in the SELECT clause
C. Enclose the character literal string in the SELECT clause within double quotation marks
D. Use the Oracle (q) operator and delimiter to allow the use of a single quotation mark within the literal character string in the SELECT clause
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
References:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm
QUESTION 23
View the exhibit and examine the ORDERS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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 24
Examine the structure of the INVOICE table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two SQL statements would execute successfully?
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 25
View the exhibit and examine the description of the PRODUCT_INFORMATION table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which SQL statement would retrieve from the table the number of products having LIST_PRICE as NULL?
Correct Answer: B
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 26
Which three tasks can be performed using SQL functions built into Oracle Database?
Explanation/Reference:
QUESTION 27
The user SCOTT who is the owner of ORDERS and ORDER_ITEMS tables issues this GRANT command:
GRANT ALL
ON orders, order_items
TO PUBLIC;
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
References:
http://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljgrant.html
QUESTION 28
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 must 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? (Choose two.)
Correct Answer: CF
Section: (none)
Explanation
Explanation/Reference:
QUESTION 29
You want to display the date for the first Monday of the next month and issue the following command:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. In generates an error because rrrr should be replaced by rr in the format string.
B. It executes successfully but does not return the correct result.
C. It executes successfully and returns the correct result.
D. In generates an error because TO_CHAR should be replaced with TO_DATE.
E. In generates an error because fm and double quotation marks should not be used in the format string.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 30
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 31
Which two tasks can be performed by using Oracle SQL statements? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
E. executing operating system (OS) commands in a session
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
References:
http://www.techonthenet.com/oracle/password.php
https://docs.oracle.com/cd/B28359_01/server.111/b28324/tdpii_distdbs.htm
QUESTION 32
View the exhibit for the structure of the STUDENT and FACULTY tables.
You need to display the faculty name followed by the number of students handled by the faculty at the base location.
Examine the following two SQL statements:
Statement 1
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
USING (faculty_id, location_id)
GROUP BY faculty_name;
Statement 2
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 33
Which statement correctly grants a system privilege?
Correct Answer: C
Section: (none)
Explanation
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
QUESTION 34
Which three statements are correct regarding indexes? (Choose three.)
A. A non-deferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically attempts to create a unique index.
B. Indexes should be created on columns that are frequently referenced as part of any expression.
C. When a table is dropped, corresponding indexes are automatically dropped.
D. For each DML operation performed on a table, the corresponding indexes are automatically updated if required.
Explanation/Reference:
References:
http://viralpatel.net/blogs/understanding-primary-keypk-constraint-in-oracle/
QUESTION 35
Which two statements are true about sequences created in a single instance Oracle database? (Choose two.)
A. When the MAXVALUE limit for a sequence is reached, it can be increased by using the ALTER SEQUENCE statement.
B. DELETE <sequencename> would remove a sequence from the database.
C. The numbers generated by an explicitly defined sequence can only be used to insert data in one table.
D. CURRVAL is used to refer to the most recent sequence number that has been generated for a particular sequence.
E. When a database instance shuts down abnormally, sequence numbers that have been cached but not used are available again when the 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
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 36
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 37
Which statement is true about an inner join specified in the WHERE clause of a query?
A. It must have primary-key and foreign-key constraints defined on the columns used in the join condition.
B. It requires the column names to be the same in all tables used for the join conditions.
C. It is applicable for equijoin and nonequijoin conditions.
D. It is applicable for only equijoin conditions.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 38
Which statement is true regarding the INTERSECT operator?
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
D. The number of columns and data types must be identical for all SELECT statements in the query.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 39
Examine the following query:
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
References:
https://oracle-base.com/articles/12c/row-limiting-clause-for-top-n-queries-12cr1
QUESTION 40
These are the steps for a correlated subquery, listed in random order:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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 41
View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
The PROD_ID column is the foreign key in the SALES table, 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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
FROM sales;
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 42
Which two statements are true regarding the USING and ON clauses in table joins?
A. Both USING and ON clauses can be used for equijoins and nonequijoins.
B. A maximum of one pair of columns can be joined between two tables using the ON clause.
C. The ON clause can be used to join tables on columns that have different names but compatible data types.
D. The WHERE clause can be used to apply additional conditions in SELECT statements containing the ON or the USING clause.
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 43
Which three statements are true? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
E. Both USER_OBJECTS and CAT views provide the same information about all objects that are owned by the user.
F. Views with the same name but different prefixes, such as DBA, ALL and USER, reference the same base tables from the data dictionary.
Explanation/Reference:
References:
https://docs.oracle.com/cd/B10501_01/server.920/a96524/c05dicti.htm
QUESTION 44
View the exhibits and examine the structures of the COSTS and PROMOTIONS tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Evaluate the following SQL statement:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 45
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.
A. UPDATE dept d
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
SET city = ALL (SELECT city
FROM locations l
WHERE d.location_id = l.location_id);
B. UPDATE dept d
SET city = (SELECT city
FROM locations l)
WHERE d.location_id = l.location_id;
C. UPDATE dept d
SET city = ANY (SELECT city
FROM locations l)
D. UPDATE dept d
SET city = (SELECT city
FROM locations l
WHERE d.location_id = l.location_id);
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 46
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 47
View the Exhibit and examine the structure of the ORDER_ITEMS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Examine the following SQL statement:
SELECT order_id, product_id, unit_price
FROM order_items
WHERE unit_price =
(SELECT MAX(unit_price)
FROM order_items
GROUP BY order_id);
You want to display the PRODUCT_ID of the product that has the highest UNIT_PRICE per ORDER_ID. What correction should be made in the above SQL
statement to achieve this?
A. Remove the GROUP BY clause from the subquery and place it in the main query
B. Replace = with the >ANY operator
C. Replace = with the >ALL operator
D. Replace = with the IN operator
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 48
Evaluate the following CREATE TABLE command:
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 49
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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 50
Which three statements are true regarding the SQL WHERE and HAVING clauses?
Explanation/Reference:
QUESTION 51
You need to display the date 11-oct-2007 in words as ‘Eleventh of October, Two Thousand Seven’.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
FROM DUAL
B. SELECT TO_CHAR (‘11-oct-2007’, ‘fmDdspth “of” Month, Year’)
FROM DUAL
C. SELECT TO_CHAR (TO_DATE (‘11-oct-2007’), ‘fmDdspth of month, year’)
FROM DUAL
D. SELECT TO_DATE (TO_CHAR (’11-oct-2007’), ‘fmDdspth “of” Month, Year’))
FROM DUAL
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 52
Which two statements are true regarding the SQL GROUP BY clause? (Choose two.)
Correct Answer: DE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 53
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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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 54
Evaluate the following CREATE TABLE commands:
CREATE_TABLE orders
(ord_no NUMBER (2) CONSTRAINT ord_pk PRIMARY KEY,
ord_date DATE,
cust_id NUMBER (4) );
The above command fails when executed. What could be the reason?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 55
Examine the structure of the PROGRAMS table:
A. SELECT NVL(ADD_MONTHS(END_DATE,1)SYSDATE)
FROM programs;
B. SELECT TO_DATE(NVL(SYSDATE-END_DATE,SYSDATE))
FROM programs;
C. SELECT NVL(MONTHS_BETWEEN(start_date,end_date),‘Ongoing’)
FROM programs;
D. SELECT NVL(TO_CHAR(MONTHS_BETWEEN(start-date,end_date)),‘Ongoing’)
FROM programs;
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 56
View the Exhibit and examine the structure of the CUSTOMERS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Using the CUSTOMERS table, you must generate a report that displays a credit limit increase of 15% for all customers.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 57
View the Exhibit and examine the description for the SALES and CHANNELS tables. (Choose the best answer.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which statement is true regarding the result?
A. The statement will fail because the subquery in the VALUES clause is not enclosed within single quotation marks.
B. The statement will fail because a subquery cannot be used in a VALUES clause.
C. The statement will execute and a new row will be inserted in the SALES table.
D. The statement will fail because the VALUES clause is not required with the subquery.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 58
View the Exhibit and examine the description of the ORDERS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two WHERE clause conditions demonstrate the correct usage of conversion functions? (Choose two.)
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 59
Which three arithmetic operations can be performed on a column by using a SQL function that is built into Oracle database? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. Finding the lowest value
B. Finding the quotient
C. Raising to a power
D. Subtraction
E. Addition
Explanation/Reference:
QUESTION 60
View the Exhibit and examine the details of the PRODUCT_INFORMATION table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Evaluate this SQL statement:
SELECT TO_CHAR (list_price, '$9,999')
From product_information;
Which two statements are true regarding the output? (Choose two.)
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 61
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 execution, 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 62
View the Exhibit and examine the structure of the ORDER_ITEMS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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(unit_price*quantity)
FROM order_items)
GROUP BY order_id;
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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 63
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 64
Which three statements are true regarding subqueries? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
E. Logical operators, such as AND, OR and NOT, cannot be used in the WHERE clause of a subquery.
Explanation/Reference:
QUESTION 65
Which two statements are true regarding single row functions? (Choose two.)
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 66
Which three statements are true regarding the usage of the WITH clause in complex correlated subqueries? (Choose three.)
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 67
Examine the structure of the EMPLOYEES table.
You must display the maximum and minimum salaries of employees hired 1 year ago.
Which two statements would provide the correct output? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
employees
WHERE hire_date < SYSDATE-365);
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 68
Which two statements are true regarding subqueries? (Choose two.)
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 69
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:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 70
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 71
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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. SELECT p.task_id, p.based_on, d.task_in_charge
FROM proj_task_details p JOIN proj_task_details d
ON (p.task_id = d.task_id);
B. SELECT p.task_id, p.based_on, d.task_in_charge
FROM proj_task_details p FULL OUTER JOIN proj_task_details d
ON (p.based_on = d.task_id);
C. SELECT p.task_id, p.based_on, d.task_in_charge
FROM proj_task_details p JOIN proj_task_details d
ON (p.based_on = d.task_id);
D. SELECT p.task_id, p.based_on, d.task_in_charge
FROM proj_task_details p LEFT OUTER JOIN proj_task_details d
ON (p.based_on = d.task_id);
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 72
Examine the structure of the SALES table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Examine this statement:
Which two statements are true about the SALES1 table? (Choose two.)
A. It will not be created because the column-specified names in the SELECT and CREATE TABLE clauses do not match.
B. It will have NOT NULL constraints on the selected columns which had those constraints in the SALES table.
C. It will not be created because of the invalid WHERE clause.
D. It is created with no rows.
E. It has PRIMARY KEY and UNIQUE constraints on the selected columns which had those constraints in the SALES table.
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 73
Which two statements are true regarding constraints? (Choose two.)
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 74
Which two statements are true regarding working with dates? (Choose two.)
A. The RR date format automatically calculates the century from the SYSDATE function but allows the session user to enter the century.
B. The RR date format automatically calculates the century from the SYSDATE function and does not allow a session user to enter the century.
C. The default internal storage of dates is in character format.
D. The default internal storage of dates is in numeric format.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 75
Examine the structure of the MEMBERS table: (Choose the best answer.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. It displays all cities in descending order, within which the last names are further sorted in descending order.
B. It fails because a column alias cannot be used in the ORDER BY clause.
C. It fails because a column number and a column alias cannot be used together in the ORDER BY clause.
D. It displays all cities in ascending order, within which the last names are further sorted in descending order.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 76
You must create a table for a banking application.
A. DATE
B. NUMBER
C. TIMESTAMP
D. INTERVAL DAY TO SECOND
E. INTERVAL YEAR TO MONTH
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 77
Examine the structure of the CUSTOMERS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
CUSTNO is the PRIMARY KEY.
You must determine if any customers' details have been entered more than once using a different CUSTNO, by listing all duplicate names.
Which two methods can you use to get the required result? (Choose two.)
A. Subquery
B. Self-join
C. Full outer-join with self-join
D. Left outer-join with self-join
E. Right outer-join with self-join
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 78
Which two are the minimal requirements for a self-join? (Choose two.)
Correct Answer: CE
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Section: (none)
Explanation
Explanation/Reference:
QUESTION 79
A subquery is called a single-row subquery when _______.
A. There is only one subquery in the outer query and the inner query returns one or more values
B. The inner query returns a single value to the outer query.
C. The inner query uses an aggregating function and returns one or more values.
D. The inner query returns one or more values and the outer query returns a single value.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 80
You must write a query that prompts users for column names and conditions every time it is executed.
The user must be prompted only once for the table name.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 81
View the Exhibit and examine the structure in the DEPARTMENTS tables. (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
WHERE department_id=10
A. ORDER BY DEPT_NAME;
B. ORDER BY DEPT_ID;
C. ORDER BY 'b';
D. ORDER BY 3;
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 82
View the Exhibit and examine the structure of the PRODUCT_INFORMATION table. (Choose the best answer.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
PRODUCT_ID column is the primary key.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. SELECT UPPER(product_name)
FROM product_information
WHERE product_id = 2254;
D. SELECT product_id
FROM product_information
WHERE UPPER(product_name) IN ('LASERPRO', 'CABLE');
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 83
See the Exhibit and examine the structure of the PROMOTIONS table:
Using the PROMOTIONS table, you need to find out the average cost for all promos in the range $0-2000 and $2000-5000 in category A.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
What would be the outcome?
A. It generates an error because multiple conditions cannot be specified for the WHEN clause.
B. It executes successfully and gives the required result.
C. It generates an error because CASE cannot be used with group functions.
D. It generates an error because NULL cannot be specified as a return value.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Explanation:
CASE Expression
Facilitates conditional inquiries by doing the work of an IF-THEN-ELSE statement:
CASE expr WHEN comparison_expr1 THEN return_expr1
[WHEN comparison_expr2 THEN return_expr2
WHEN comparison_exprn THEN return_exprn
ELSE else_expr]
END
QUESTION 84
View the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
The CUSTOMERS table contains the current location of all currently active customers.
The CUST_HISTORY table stores historical details relating to any changes in the location of all current as well as previous customers who are no longer active with
the company.
You need to find those customers who have never changed their address.
Which SET operator would you use to get the required output?
A. INTERSECT
B. UNION ALL
C. MINUS
D. UNION
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 85
View the Exhibit and examine PRODUCTS and ORDER_ITEMS tables.
You executed the following query to display PRODUCT_NAME and the number of times the product has been ordered:
Correct Answer: A
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 86
Which two statements are true regarding constraints?
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 87
You notice a performance change in your production Oracle 12c database. You want to know which change caused this performance difference.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 88
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which statement is true about Enterprise Manager (EM) express in Oracle Database 12c?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 89
Which two partitioned table maintenance operations support asynchronous Global Index Maintenance in Oracle database 12c?
Correct Answer: CE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 90
View the Exhibits and examine PRODUCTS and SALES tables.
Exhibit 1
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Exhibit 2
You issue the following query to display product name the number of times the product has been sold:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
What happens when the above statement is executed?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 91
View the Exhibit and examine the data in the EMPLOYEES table.
Exhibit
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You want to generate a report showing the total compensation paid to each employee to date.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 92
View the Exhibit and examine the details of the PRODUCT_INFORMATION table.
Exhibit
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You must 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.
A. It would not execute because the entire WHERE clause is not enclosed within parentheses.
B. It would execute but would return no rows.
C. It would not execute because the same column has been used twice with the AND logical operator.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
D. It would execute and return the desired result.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 93
SCOTT is a user in the database.
A. Statement 1 would not execute because the WITH GRANT option is missing.
B. Statement 2 would not execute because system privileges and object privileges cannot be granted together in a single GRANT command.
C. Statement 3 would not execute because role and system privileges cannot be granted together in a single GRANT statement.
D. Statement 1 would not execute because the IDENTIFIED BY <password> clause is missing.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 94
View the Exhibit and examine the data in the PRODUCT_INFORMATION table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two tasks would require subqueries? (Choose two.)
A. displaying all the products whose minimum list prices are more than average list price of products having the status orderable
B. displaying the total number of products supplied by supplier 102071 and having product status OBSOLETE
C. displaying the number of products whose list prices are more than the average list price
D. displaying all supplier IDs whose average list price is more than 500
E. displaying the minimum list price for each product status
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 95
View the Exhibit and examine the description of the EMPLOYEES table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You want to calculate the total remuneration for each employee. Total remuneration is the sum of the annual salary and the percentage commission earned for a
year. Only a few employees earn commission.
Which SQL statement would you execute to get the desired output?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 96
Which statement is true regarding the USING clause in table joins? (Choose two.)
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 97
Examine the structure proposed for the TRANSACTIONS table:
Which two statements are true regarding the storage of data in the above table structure? (Choose two.)
A. The CUST_CREDIT_VALUE column would allow storage of positive and negative integers.
B. The TRANS_VALIDITY column would allow storage of a time interval in days, hours, minutes, and seconds.
C. The CUST_STATUS column would allow storage of data up to the maximum VARCHAR2 size of 4,000 characters.
D. The TRANS_DATE column would allow storage of dates only in the dd-mon-yyyy format.
Correct Answer: AB
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 98
Examine the structure of the MARKS table:
https://www.gratisexam.com/
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 99
Examine the data in the CUSTOMERS table:
You want to list all cities that have more than one customer along with the customer details.
Which two JOIN options can be used in the blank in the above query to give the correct output? (Choose two.)
Correct Answer: BD
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 100
In the EMPLOYEES table there are 1000 rows and employees are working in the company for more than 10 years.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 101
View the Exhibit and examine the data in the PROMOTIONS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
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.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_cost LIKE 'post%' AND promo_begin_date < '01-01-2000';
D. SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category LIKE '%post%' AND promo_begin_date < '1-JAN-00';
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 102
Which two statements are true regarding views? (Choose two.)
A. The WITH CHECK OPTION constraint can be used in a view definition to restrict the columns displayed through the view.
B. The OR REPLACE option is used to change the definition of an existing view without dropping and re-creating it.
C. Rows cannot be deleted through a view if the view definition contains the DISTINCT keyword.
D. Rows added through a view are deleted from the table automatically when the view is dropped.
E. A simple view in which column aliases have been used cannot be updated.
F. A subquery used in a complex view definition cannot contain group functions or joins.
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 103
Evaluate the following CREATE SEQUENCE statement:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
The sequence SEQ1 has generated numbers up to the maximum limit of 200. You issue the following SQL statement:
A. 100
B. an error
C. 10
D. 1
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 104
Which statement is true regarding the SESSION_PRIVS dictionary view?
A. It contains the object privileges granted to other users by the current user session.
B. It contains the system privileges granted to other users by the current user session.
C. It contains the current object privileges available in the user session.
D. It contains the current system privileges available in the user session.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 105
Which three statements indicate the end of a transaction? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. after a SELECT statement is issued
D. after a ROLLBACK is issued
E. after a COMMIT is issued
Explanation/Reference:
QUESTION 106
Examine the structure of the BOOKS_TRANSACTIONS table.
You want to update this table such that BOOK_ID is set to 'INVALID' for all rows where no MEMBER_ID has been entered.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which condition must be used in the WHERE clause to perform the required update?
A. MEMBER_ID = '';
B. MEMBER_ID = NULL;
C. MEMBER_ID IS NULL;
D. MEMBER_ID = "";
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 107
View the Exhibit and examine the structure of the CUSTOMERS table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Evaluate the following SQL statement:
A. It returns an error because the BETWEEN operator cannot be used in the HAVING clause.
B. It returns an error because WHERE and HAVING clauses cannot be used in the same SELECT statement.
C. It returns an error because WHERE and HAVING clauses cannot be used to apply conditions on the same column.
D. It executes successfully.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 108
View the Exhibit and examine the details of the ORDER_ITEMS table.
Statement 1:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
FROM order_items;
Statement 2:
Which statements are true regarding the output of these SQL statements? (Choose all that apply.)
Explanation/Reference:
QUESTION 109
View the Exhibit and examine the structure of ORDER_ITEMS and ORDERS tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You need to remove from the ORDER_ITEMS table those rows that have an order status of 0 or 1 in the ORDERS table.
A. DELETE *
FROM order_items
WHERE order_id IN (SELECT order_id)
FROM orders
WHERE order_status IN (0,1));
B. DELETE
FROM (SELECT * FROM order_items I,orders o
WHERE i.order_id = o.order_id AND order_status IN (0,1));
C. DELETE FROM order_items i
WHERE order_id = (SELECT order_id FROM orders o
WHERE i.order_id = o.order_id AND order_status IN (0,1));
D. DELETE
FROM order_items
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
WHERE order_id IN (SELECT order_id
FROM orders
WHERE orders_status in (0,1));
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 110
The PRODUCTS table has the following structure.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Explanation:
Using the NVL2 Function
The NVL2 function examines the first expression. If the first expression is not null, the NVL2 function returns the second expression. If the first expression is null,
the third expression is returned.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Syntax
NVL2(expr1, expr2, expr3)
In the syntax:
Expr1 is the source value or expression that may contain a null
Expr2 is the value that is returned if expr1 is not null
Expr3 is the value that is returned if expr1 is null
QUESTION 111
View the Exhibit and examine the structure of the CUSTOMERS table.
You want to generate a report showing the last names and credit limits of all customers whose last names start with A, B, or C, and credit limit is below 10,000.
Evaluate the following two queries:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
SQL>SELECT cust_last_name, cust_credit_limit FROM customers
WHERE UPPER (cust_last_name) BETWEEN ‘A’ AND ‘C’
AND cust_credit_limit < 10000;
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 112
View the Exhibit and examine the structure of the PRODUCT table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two tasks would require subqueries? (Choose two.)
A. display all products whose minimum list price is more than the average list price of products having the status ‘orderable’
B. display the total number of products supplied by supplier 102 and have product status as ‘OBSOLETE’
C. display the number of products whose list prices are more than the average list price
D. display all suppliers whose list price is more than 1000
E. display the minimum list price for each product status
Correct Answer: AC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 113
View the Exhibit and examine the structure of ORDERS and CUSTOMERS tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
There is only one customer with the cust_last_name column having value Roberts. Which INSERT statement should be used to add a row into the ORDERS table
for the customer whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600?
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
AND c.cust_last_name=’Roberts’ AND c.credit_limit=600 )
VALUES (1, ’10-mar-2007’, ‘direct’, (SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600), 1000);
D. INSERT INTO orders (order_id, order_data, order_mode,
(SELECT customer_id
FROM customers
WHERE cust_last_name=’Roberts’ AND
credit_limit=600), order_total)
VALUES (1, ’10-mar-2007’, ‘direct’, &customer_id, 1000).
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 114
View the Exhibit and examine the data in EMP and DEPT tables.
What would be the outcome of the following statements executed in the given sequence?
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
DROP TABLE emp;
A. Both the INSERT statements would fail because the constraints are automatically retrieved when the table is flashed back.
B. Both the INSERT statements would succeed because none of the constraints on the table are automatically retrieved when the table is flashed back.
C. Only the first INSERT statement would succeed because all constraints except the primary key constraint are automatically retrieved after a table is flashed
back.
D. Only the SECOND INSERT statement would succeed because all the constraints except referential integrity constraints that reference other tables are retrieved
automatically after the table is flashed back.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 115
Which three tasks can be performed by DDL statements? (Choose three.)
Explanation/Reference:
QUESTION 116
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Examine the structure of the SHIPMENTS table:
You want to generate a report that displays the PO_ID and the penalty amount to be paid if the SHIPMENT_DATE is later than one month from the PO_DATE. The
penalty is $20 per day.
Correct Answer: C
Section: (none)
Explanation
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
QUESTION 117
Examine the structure and data in the PRICE_LIST table:
You plan to give a discount of 25% on the product price and need to display the discount amount in the same format as the PROD_PRICE.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 118
View the Exhibit and examine the data in the PRODUCTS table.
Which statement would add a column called PRICE, which cannot contain NULL?
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 119
The customers table has the following structure:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You need to write a query that does the following tasks:
1. Display the first name and tax amount of the customers. Tax is 5% of their credit limit.
2. Only those customers whose income level has a value should be considered.
3. Customers whose tax amount is null should not be considered.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 120
Which statement is true about the Oracle SQL, DELETE and TRUNCATE statements?
A. DELTE and TRUNCATE statements can have a rollback done to restore data into a table.
B. DELETE and TRUNCATE statements remove all indexes for the tables on which they are performed.
C. DELETE but not TRUNCATE statement can be used to remove data from selective columns and rows of a table.
D. DELETE but not TRUNCATE statement can be used to selectively remove rows from a table.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 121
View the Exhibit and examine the description of the EMPLOYEES table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
SELECT first_name, employee_id, NEXT_DAY(ADD_MONTHS(hire_date, 6), 1) “Review” FROM employees;
The query was written to retrieve the FIRST_NAME, EMPLOYEE_ID, and review date for employees. The review date is the firsts Monday after the completion of
six months of the hiring. The NLS_TERRITORY parameter is set to AMERICA in the session.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 122
View the Exhibit and examine the structure of the CUSTOMERS table.
CUSTOMER_VU is a view based on CUSTOMERS_BR1 table which has the same structure as CUSTOMERS table.
CUSTOMERS need to be updated to reflect the latest information about the customers.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. The CUSTOMER_ID column cannot be updated.
B. The INTO clause is misplaced in the command.
C. The WHERE clause cannot be used with INSERT.
D. CUSTOMER_VU cannot be used as a data source.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 123
Evaluate the following SQL statement:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which statement is true regarding the outcome of the above query?
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 124
What is the primary difference between the relational database (RDB) and object-oriented database (OODB) models?
A. OODB supports multiple objects in the same database, whereas RDB supports only tables.
B. RDB supports only E.F. Codd’s rules, whereas OODB does not support them.
C. OODB incorporates methods with data structure definition, whereas RDB does not allow this.
D. RDB allows the definition of relationships between different tables, whereas OODB does not allow this.
Correct Answer: C
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Section: (none)
Explanation
Explanation/Reference:
QUESTION 125
You need to list the employees in DEPARTMENT_ID 20 days in a single row, ordered by HIRE_DATE.
A. SELECT LISTAGG(last_name)
WITHIN GROUP ORDER BY (hire_date) “Emp_list”, MIN(hire_date) “Earliest”
FROM employees
WHERE department_id = 30;
B. SELECT LISTAGG(last_name, '; ')
WITHIN GROUP ORDER BY (hire_date) “Emp_list”, MIN(hire_date) “Earliest”
FROM employees
WHERE department_id = 30;
C. SELECT LISTAGG(last_name, '; ') “Emp_list”, MIN(hire_date) “Earliest”
FROM employees
WHERE department_id = 30;
WITHIN GROUP ORDER BY (hire_date);
D. SELECT LISTAGG(last_name, '; ') “Emp_list”, MIN(hire_date) “Earliest”
FROM employees
WHERE department_id = 30;
ORDER BY (hire_date);
Correct Answer: B
Section: (none)
Explanation
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
QUESTION 126
Examine the structure of the DEPARTMENTS table.
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 127
View the exhibit and examine the description of SALES and PROMOTIONS tables.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You want to delete rows from the SALES table, where the PROMO_NAME column in the PROMOTIONS table has either blowout sale or everyday low price
as values.
A. DELETE
FROM sales
WHERE promo_id = (SELECT promo_id
FROM promo_name = ‘blowout sale’)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
AND promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = ‘everyday low price’)
FROM promotions
WHERE promo_name = ‘everyday low price’);
B. DELETE
FROM sales
WHERE promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = ‘blowout sale’)
OR promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = ‘everyday low price’)
C. DELETE
FROM sales
WHERE promo_id = (SELECT promo_id
FROM promotions
WHERE promo_name = ‘blowout sale’)
OR promo_name = ‘everyday low price’);
D. DELETE
FROM sales
WHERE promo_id IN (SELECT promo_id
FROM promotions
WHERE promo_name IN = ‘blowout sale’,‘everyday low price’));
Explanation/Reference:
QUESTION 128
You need to display the first names of all customers from the CUSTOMERS table that contain the character ‘e’ and have the character ‘a’ in the second last position.
A. SELECT cust_first_name
FROM customers
WHERE INSTR(cust_first_name, ‘e’)<>0 AND
SUBSTR(cust_first_name, -2, 1)=’a’;
B. SELECT cust_first_name
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
FROM customers
WHERE INSTR(cust_first_name, ‘e’)<>'' AND
SUBSTR(cust_first_name, -2, 1)=’a’;
C. SELECT cust_first_name
FROM customers
WHERE INSTR(cust_first_name, ‘e’)IS NOT NULL AND
SUBSTR(cust_first_name, 1, -2)=’a’;
D. SELECT cust_first_name
FROM customers
WHERE INSTR(cust_first_name, ‘e’)<>0 AND
SUBSTR(cust_first_name, LENGTH(cust_first_name), -2)=’a’;
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 129
Examine the data in the ORD_ITEMS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which statement is true regarding the result?
A. It returns an error because the HAVING clause should be specified after the GROUP BY clause.
B. It returns an error because all the aggregate functions used in the HAVING clause must be specified in the SELECT list.
C. It displays the item nos with their average quantity where the average quantity is more than double the minimum quantity of that item in the table.
D. It displays the item nos with their average quantity where the average quantity is more than double the overall minimum quantity of all the items in the table.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 130
Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.)
A. DELETE can be used to remove rows from only one table in one statement.
B. DELETE can be used to remove rows from multiple tables in one statement.
C. DELETE can be used to remove rows only for tables that are parents for a child table that has a referential integrity constraint referring to the parent.
D. DELETE can be used to remove data from specific columns as well as complete rows.
E. DELETE and TRUNCATE can be used for tables that are parents for a child table that has a referential integrity constraint having an ON DELETE rule.
Correct Answer: AE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 131
The SQL statements executed in a user session are as follows:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two statements describe the consequences of issuing the ROLLBACK TO SAVE POINT a command in the session? (Choose two.)
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 132
Examine the description of the CUSTOMERS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
For customers whose income level has a value, you want to display the first name and due amount as 5% of their credit limit. Customers whose due amount is null
should not be displayed.
A.
B.
C.
D.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
E.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 133
Which three statements are true about views in an Oracle Database? (Choose three.)
A. Views can join tables only if they belong to the same schema.
B. A view can be created that refers to a non-existent table in its defining query.
C. Views have no object number.
D. Views have no segment.
E. Rows inserted into a table using a view are retained in the table if the view is dropped.
F. A SELECT statement cannot contain a WHERE clause when querying a view containing a WHERE clause in its defining query.
Explanation/Reference:
QUESTION 134
Examine the description of the CUSTOMERS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You need to display last names and credit limits of all customers whose last name starts with A or B in lower or upper case, and whose credit limit is below 1000.
Which two WHERE conditions give the required result? (Choose two.)
A.
B.
C.
D.
E.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 135
Examine the data in the CUST_NAME column of the CUSTOMERS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You want to display the CUST_NAME values where the last name starts with Mc or MC.
Which two WHERE clauses give the required result? (Choose two.)
Correct Answer: AE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 136
Which three actions can you perform only with system privileges? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: ABF
Section: (none)
Explanation
Explanation/Reference:
QUESTION 137
Examine the description of the SALES table:
A. SALES1 has NOT NULL constraints on any selected columns which had those constraints in the SALES table.
B. SALES1 is created with 55,000 rows.
C. SALES1 has PRIMARY KEY and UNIQUE constraints on any selected columns which had those constraints in the SALES table.
D. SALES1 is created with no rows.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
E. SALES1 is created with 1 row.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.oracle.com/a/ocom/docs/dc/ww-ou-5297-database2019-studyguide-5.pdf
QUESTION 138
Which three statements are true about GLOBAL TEMPORARY TABLES? (Choose three.)
Explanation/Reference:
Reference: https://books.google.com.pk/books?id=oP88fSdbQJIC&pg=PA11&lpg=PA11&dq=oracle+database+GLOBAL+TEMPORARY+TABLES+Data
+Manipulation+Language+(DML)+on+GLOBAL+TEMPORARY+TABLES+generates+no
+REDO&source=bl&ots=F7EL8Y0ST9&sig=ACfU3U1KuLlqyyJFxqAG1LRT4OxprsVZdg&hl=en&sa=X&ved=2ahUKEwi0xdPU94vlAhWp34UKHUYpBtAQ6AEwAHo
ECAkQAQ#v=onepage&q=oracle%20database%20GLOBAL%20TEMPORARY%20TABLES%20Data%20Manipulation%20Language%20(DML)%20on%
20GLOBAL%20TEMPORARY%20TABLES%20generates%20no%20REDO&f=false
QUESTION 139
Examine the description of the CUSTOMERS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
CUSTNO is the PRIMARY KEY.
You must determine if any customers’ details have been entered more than once using a different CUSTNO, by listing all duplicate names.
Which two methods can you use to get the required result? (Choose two.)
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 140
Which CREATE TABLE statement is valid?
A.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
B.
C.
D.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 141
The SALES table has columns PROD_ID and QUANTITY_SOLD of data type NUMBER.
A. SELECT prod_id FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id HAVING COUNT(*) > 10;
B. SELECT prod_id FROM sales WHERE quantity_sold > 55000 AND COUNT(*) > 10 GROUP BY prod_id HAVING COUNT(*) > 10;
C. SELECT COUNT(prod_id) FROM sales WHERE quantity_sold > 55000 GROUP BY prod_id;
D. SELECT prod_id FROM sales WHERE quantity_sold > 55000 AND COUNT(*) > 10 GROUP BY COUNT(*) > 10;
E. SELECT COUNT(prod_id) FROM sales GROUP BY prod_id WHERE quantity_sold > 55000;
Correct Answer: AC
Section: (none)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
QUESTION 142
Examine these statements executed in a single Oracle session:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. The code for pen is 1.
B. There is no row containing pencil.
C. The code for fountain pen is 3.
D. The code for pen is 10.
E. There is no row containing fountain pen.
F. There is no row containing pen.
Explanation/Reference:
QUESTION 143
Which two are true about dropping columns from a table? (Choose two.)
Correct Answer: AF
Section: (none)
Explanation
Explanation/Reference:
QUESTION 144
The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE.
You want to display the date of the first Monday after the completion of six months since hiring.
The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day of the week.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which query can be used?
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: http://www.dba-oracle.com/t_add_months.htm
QUESTION 145
Which three statements are true about the Oracle join and ANSI join syntax? (Choose three.)
Explanation/Reference:
Reference: http://www.dba-oracle.com/oracle_tips_iso99_joins.htm
QUESTION 146
Examine the description of the PRODUCT_STATUS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
The STATUS column contains the values IN STOCK or OUT OF STOCK for each row.
A.
B.
C.
D.
E.
F.
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 147
What is true about non-equijoin statement performance?
A. The BETWEEN condition always performs less well than using the >= and <= conditions.
B. The join syntax used makes no difference to performance.
C. Table aliases can improve performance.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
D. The BETWEEN condition always performs better than using the >= and <= conditions.
E. The Oracle join syntax performs better than the SQL:1999 compliant ANSI join syntax.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.academia.edu/17342225/SQL_notes
QUESTION 148
Examine this description of the PRODUCTS table:
A.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
B.
C.
D.
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 149
In which three situations does a new transaction always start? (Choose three.)
A. when issuing a TRUNCATE statement after a SELECT statement was issued in the same session
B. when issuing a CREATE INDEX statement after a CREATE TABLE statement completed successfully in the same session
C. when issuing a CREATE TABLE statement after a SELECT statement was issued in the same session
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
D. when issuing the first Data Manipulation Language (DML) statement after a COMMIT or ROLLBACK statement was issued in the same session
E. when issuing a DML statement after a DML statement failed in the same session
F. when issuing a SELECT FOR UPDATE statement after a CREATE TABLE AS SELECT statement was issued in the same session
Explanation/Reference:
Reference: https://docs.oracle.com/cd/B19306_01/server.102/b14220/transact.htm
QUESTION 150
Which two statements are true regarding the COUNT function? (Choose two.)
A. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE clause.
B. COUNT(DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and NULLs in the INV_AMT column.
C. COUNT(inv_amt) returns the number of rows in a table including rows with NULL in the INV_AMT column.
D. COUNT(*) returns the number of rows including duplicate rows and rows containing NULL value in any column.
E. It can only be used for NUMBER data types.
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 151
Examine this statement:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. 0 rows
B. an error
C. 1 row
D. 2 rows
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 152
MANAGER is an existing role with no privileges or roles.
EMP is an existing role containing the CREATE TABLE privilege.
EMPLOYEES is an existing table in the HR schema.
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 153
Which statement is true regarding the default behavior of the ORDER BY clause? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. Only columns that are specified in the SELECT list can be used in the ORDER BY clause.
D. Numeric values are displayed in descending order if they have decimal positions.
E. Column aliases can be used in the ORDER BY clause.
Correct Answer: AE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 154
You execute this query:
A. It returns the date for the first Monday of the next month.
B. It returns the date for the last Monday of the current month.
C. It executes successfully but does not return any result.
D. It generates an error.
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 155
In the PROMOTIONS table, the PROMO_BEGIN_DATE column is of data type DATE and the default date format is DD-MON-RR.
Which two statements are true about expressions using PROMO_BEGIN_DATE contained a query? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
https://www.gratisexam.com/
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 156
Examine the description of the SALES1 table:
You want to display the rows from the SALES1 table which are not present in the SALES2 table.
A. SUBTRACT
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
B. INTERSECT
C. UNION ALL
D. UNION
E. MINUS
Correct Answer: E
Section: (none)
Explanation
Explanation/Reference:
QUESTION 157
Examine this query:
SELECT 2 FROM DUAL d1 CROSS JOIN DUAL d2 CROSS JOIN DUAL d3;
A. 8 rows
B. 1 row
C. 6 rows
D. 3 rows
E. 0 rows
F. an error
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
QUESTION 158
The PRODUCT_INFORMATION table has a UNIT_PRICE column of data type NUMBER (8, 2).
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two statements are true about the output? (Choose two.)
A. A row whose UNIT_PRICE column contains the value 1023.99 will be displayed as $1,024.
B. A row whose UNIT_PRICE column contains the value 10235.99 will be displayed as $1,0236.
C. A row whose UNIT_PRICE column contains the value 10235.99 will be displayed as #######.
D. A row whose UNIT_PRICE column contains the value 10235.99 will be displayed as $1,023.
E. A row whose UNIT_PRICE column contains the value 1023.99 will be displayed as $1,023.
Correct Answer: CE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 159
Examine the description of the BOOKS_TRANSACTIONS table:
Which two WHERE conditions give the same result? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 160
Which two statements are true about a self join? (Choose two.)
Correct Answer: CE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.oracletutorial.com/oracle-basics/oracle-self-join/
QUESTION 161
Examine the description of the EMPLOYEES table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id, join_date;
D. SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id;
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 162
Which three statements are true about performing Data Manipulation Language (DML) operations on a view in an Oracle Database? (Choose three.)
A. Views cannot be used to add or modify rows in an underlying table if the defining query of the view contains the DISTINCT keyword.
B. Views cannot be used to query rows from an underlying table if the table has a PRIMARY KEY and the PRIMARY KEY columns are not referenced in the
defining query of the view.
C. Views cannot be used to add rows to an underlying table if the table has columns with NOT NULL constraints lacking default values which are not referenced in
the defining query of the view.
D. The WITH CHECK clause has no effect when deleting rows from the underlying table through the view.
E. Insert statements can always be done on a table through a view.
F. Views cannot be used to add or modify rows in an underlying table if the defining query of the view contains aggregating functions.
Explanation/Reference:
QUESTION 163
Which two statements are true about the ORDER BY clause when used with a SQL statement containing a SET operator such as UNION? (Choose two.)
A. Each SELECT statement in the compound query must have its own ORDER BY clause.
B. Each SELECT statement in the compound query can have its own ORDER BY clause.
C. Column positions must be used in the ORDER BY clause.
D. The first column in the first SELECT of the compound query with the UNION operator is used by default to sort output in the absence of an ORDER BY clause.
E. Only column names from the first SELECT statement in the compound query are recognized.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 164
Which three statements are true about Data Manipulation Language (DML)? (Choose three.)
A. UPDATE statements can have different subqueries to specify the values for each updated column.
B. INSERT statements can insert NULLS explicitly into a column.
C. DELETE statements can remove multiple rows based on multiple conditions.
D. DML statements require a primary key be defined on a table.
E. INSERT INTO…SELECT…FROM statements automatically commit.
Explanation/Reference:
QUESTION 165
Examine the description of the BOOKS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two statements are true? (Choose two.)
A. The first ROLLBACK command restores the 101 rows that were deleted, leaving the inserted row still to be committed.
B. The second ROLLBACK command replays the delete.
C. The first ROLLBACK command restores the 101 rows that were deleted and commits the inserted row.
D. The second ROLLBACK command undoes the insert.
E. The second ROLLBACK command does nothing.
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 166
Which three are true about privileges and roles? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation
Explanation/Reference:
Reference: https://docs.oracle.com/cd/B19306_01/network.102/b14266/authoriz.htm#i1010570
QUESTION 167
Which three statements are true about defining relations between tables in a relational database? (Choose three.)
Explanation/Reference:
QUESTION 168
You execute this command:
Correct Answer: DE
Section: (none)
Explanation
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
Reference: https://docs.oracle.com/html/E25494_01/general003.htm
QUESTION 169
Which three statements are true about Structured Query Language (SQL)? (Choose three.)
Explanation/Reference:
Reference: https://docs.microsoft.com/en-us/sql/relational-databases/hierarchical-data-sql-server?view=sql-server-2017
QUESTION 170
Evaluate these commands which execute successfully:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two statements are true about the ORD_ITEMS table and the ORD_SEQ sequence? (Choose two.)
A. Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can cycle 20 times.
B. Any user inserting rows into table ORD_ITEMS must have been granted access to sequence ORD_SEQ.
C. Column ORD_NO gets the next number from sequence ORD_SEQ whenever a row is inserted into ORD_ITEMS and no explicit value is given for ORD_NO.
D. If sequence ORD_SEQ is dropped then the default value for column ORD_NO will be NULL for rows inserted into ORD_ITEMS.
E. Sequence ORD_SEQ is guaranteed not to generate duplicate numbers.
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 171
Which two statements are true about INTERVAL data types? (Choose two.)
A. The YEAR field in an INTERVAL YEAR TO MONTH column must be a positive value.
B. INTERVAL DAY TO SECOND columns support fractions of seconds.
C. INTERVAL YEAR TO MONTH columns only support monthly intervals within a single year.
D. INTERVAL YEAR TO MONTH columns support yearly intervals.
E. INTERVAL YEAR TO MONTH columns only support monthly intervals within a range of years.
F. The value in an INTERVAL DAY TO SECOND column can be copied into an INTERVAL YEAR TO MONTH column.
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.oracletutorial.com/oracle-basics/oracle-interval/
QUESTION 172
Which two statements are true about the DUAL table? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. It can display multiple rows and columns.
D. It consists of a single row and single column of VARCHAR2 data type.
E. It can be used to display only constants or pseudo columns.
F. It can be accessed only by the SYS user.
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 173
Which two are true about the WITH GRANT OPTION clause? (Choose two.)
A. The grantee must have the GRANT ANY OBJECT PRIVILEGE system privilege to use this option.
B. It can be used when granting privileges to roles.
C. It cannot be used to pass on privileges to PUBLIC by the grantee.
D. It can be used for system and object privileges.
E. It can be used to pass on privileges to other users by the grantee.
F. The grantee can grant the object privilege to any user in the database, with or without including this option.
Correct Answer: DE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9013.htm
QUESTION 174
Examine this partial command:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which two clauses are required for this command to execute successfully? (Choose two.)
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
QUESTION 175
Which three statements are true about indexes and their administration in an Oracle database? (Choose three.)
Explanation/Reference:
QUESTION 176
Examine this description of the PRODUCTS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Rows exist in this table with data in all the columns. You put the PRODUCTS table in read-only mode.
Explanation/Reference:
QUESTION 177
You want to write a query that prompts for two column names and the WHERE condition each time it is executed in a session but only prompts for the table name the
first time it is executed.
The variables used in your query are never undefined in your session.
A.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
B.
C.
D.
E.
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 178
Which two statements are true regarding the UNION and UNION ALL operators? (Choose two.)
Correct Answer: CE
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 179
Which two statements are true about single-row functions? (Choose two.)
Correct Answer: CE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.folkstalk.com/2012/01/oracle-single-row-functions-examples.html
QUESTION 180
Which three statements are true about sequences in a single instance Oracle database? (Choose three.)
Explanation/Reference:
Reference: https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6015.htm
QUESTION 181
Which two statements are true about the SET VERIFY ON command? (Choose two.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
B. It displays values for variables used only in the WHERE clause of a query
C. It can be used only in SQL*Plus
D. It displays values for variables prefixed with &&
E. It displays values for variables created by the DEFINE command
Correct Answer: CE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://blogs.oracle.com/opal/sqlplus-101-substitution-variables#4_1_8
QUESTION 182
Which two statements are true about the rules of precedence for operators? (Choose two.)
A. The concatenation operator | | is always evaluated before addition and subtraction in an expression
B. Multiple parentheses can be used to override the default precedence of operators in an expression
C. Arithmetic operators with equal precedence area evaluated from left to right within an expression
D. NULLS influence the precedence of operators in an expression
E. The + binary operator has the highest precedence in an expression in a SQL statement
Correct Answer: BE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://docs.oracle.com/cd/B19306_01/server.102/b14200/operators001.htm
QUESTION 183
Which three are true about system and object privileges? (Choose three.)
A. WITH GRANT OPTION can be used when granting an object privilege to both users and roles
B. Adding a primary key constraint to an existing table in another schema requires a system privilege
C. Adding a foreign key constraint pointing to a table in another schema requires the REFERENCES object privilege
D. Revoking a system privilege that was granted with WITH ADMIN OPTION has a cascading effect
E. Revoking an object privilege that was granted with the WITH GRANT OPTION clause has a cascading effect.
F. WITH GRANT OPTION cannot be used when granting an object privilege to PUBLIC
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: ACE
Section: (none)
Explanation
Explanation/Reference:
Reference https://docs.oracle.com/cd/B28359_01/network.111/b28531/authorization.htm#DBSEG004
QUESTION 184
Which two statements are true about substitution variables? (Choose two.)
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
Reference: https://blogs.oracle.com/opal/sqlplus-101-substitution-variables
QUESTION 185
Which three statements are true about inner and outer joins? (Choose three.)
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Explanation/Reference:
Reference: https://www.studytonight.com/dbms/joining-in-sql.php
QUESTION 186
Examine the description of the PRODUCTS table:
Explanation/Reference:
QUESTION 187
The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2.
The table has two rows whose CUST_LAST_NAME values are Anderson and Ausson.
Which query produces output for CUST_LAST_NAME containing Oder for the first row and Aus for the second?
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
A. SELECT REPLACE (TRIM(TRAILING ‘son’ FROM cust_last_name), ‘An’, ‘O’) FROM customers;
B. SELECT INITCAP (REPLACE(TRIM(‘son’ FROM cust_last_name), ‘An’, ‘O’)) FROM customers;
C. SELECT REPLACE (SUBSTR(cust_last_name, -3), ‘An’, ‘O’) FROM customers;
D. SELECT REPLACE (REPLACE(cust_last_name, ‘son’, ‘’), ‘An’, ‘O’) FROM customers;
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 188
Which three statements are true about performing Data Manipulation Language (DML) operations on a view with no INSTEAD OF triggers defined? (Choose three.)
Explanation/Reference:
QUESTION 189
An Oracle database server session has an uncommitted transaction in progress which updated 5000 rows in a table.
In which three situations does the transactions complete thereby committing the updates? (Choose three.)
A. when a DBA issues a successful SHUTDOWN TRANSACTIONAL statement and the user then issues a COMMIT
B. when a CREATE INDEX statement is executed successfully in the same session
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
C. when a COMMIT statement is issued by the same user from another session in the same database instance
D. when the session logs out successfully
E. when a DBA issues a successful SHUTDOWN IMMEDIATE statement and the user then issues a COMMIT
F. when a CREATE TABLE AS SELECT statement is executed unsuccessfully in the same session
Explanation/Reference:
QUESTION 190
The INVOICE table has a QTY_SOLD column of data type NUMBER and an INVOICE_DATE column of data type DATE.
Which two are true about data type conversions involving these columns in query expressions? (Choose two.)
Correct Answer: CD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 191
Which three statements are true regarding indexes? (Choose three.)
A. A SELECT statement can access one or more indices without accessing any tables
B. An update to a table can result in no updates to any of the table’s indexes
C. A table belonging to one user can have an index that belongs to a different user
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
D. A UNIQUE index can be altered to be non-unique
E. An update to a table can result in updates to any or all of the table’s indexes
F. When a table is dropped and is moved to the RECYCLE BIN, all indexes built on that table are permanently dropped
Explanation/Reference:
QUESTION 192
Which three are true about the CREATE TABLE command? (Choose three.)
A. It can include the CREATE..INDEX statement for creating an index to enforce the primary key constraint
B. It implicitly executes a commit
C. A user must have the CREATE ANY TABLE privilege to create tables
D. It implicitly rolls back any pending transactions
E. The owner of the table should have space quota available on the tablespace where the table is defined
F. The owner of the table must have the UNLIMITED TABLESPACE system privilege
Explanation/Reference:
Reference: https://docs.oracle.com/html/E25494_01/tables003.htm
QUESTION 193
You need to calculate the number of days from 1st January 2019 until today.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
D. SELECT ROUND(SYSDATE – TO_DATE(‘01/JANUARY/2019’)) FROM DUAL;
E. SELECT TO_DATE(SYSDATE, ‘DD/MONTH/YYYY’) – ‘01/JANUARY/2019’ FROM DUAL;
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 194
Which three actions can you perform by using the ORACLE_DATAPUMP access driver? (Choose three.)
A. Read data from an external table and load it into a table in the database
B. Create a directory object for an external table
C. Execute DML statements on an external table
D. Query data from an external table
E. Read data from a table in the database and insert it into an external table
F. Create a directory object for a flat file
Explanation/Reference:
QUESTION 195
Which three statements are true about single-row functions? (Choose three.)
Correct Answer: BD
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.folkstalk.com/2012/01/oracle-single-row-functions-examples.html
QUESTION 196
Which two statements are true regarding a SAVEPOINT? (Choose two.)
Correct Answer: AE
Section: (none)
Explanation
Explanation/Reference:
QUESTION 197
You have been tasked to create a table for a banking application.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
QUESTION 198
The ORDERS table has a column ORDER_DATE of data type DATE.
Which two WHERE conditions demonstrate the correct usage of conversion functions? (Choose two.)
Correct Answer: AB
Section: (none)
Explanation
Explanation/Reference:
Reference: https://ss64.com/ora/syntax-to_date.html
QUESTION 199
Examine the description of the PROMOTIONS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
You want to display the unique promotion costs in each promotion category.
Correct Answer: BC
Section: (none)
Explanation
Explanation/Reference:
QUESTION 200
Examine the description of the EMPLOYEES table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which line produces an error?
A. Line 5
B. Line 8
C. Line 7
D. Line 3
Correct Answer: D
Section: (none)
Explanation
Explanation/Reference:
QUESTION 201
Which two are true about savepoints? (Choose two.)
A. After issuing a savepoints, you can roll back to the savepoint name within the current transaction.
B. A ROLLBACK TO SAVEPOINT command issued before the start of a transaction results in an error.
C. They make uncommitted updates visible to other sessions owned by the same user.
D. After issuing a savepoint, you cannot roll back the complete transaction.
E. You can commit updates done between two savepoints without committing other updates in the current transaction.
F. They make uncommitted updates visible to sessions owned by other users.
Correct Answer: AE
Section: (none)
Explanation
Explanation/Reference:
Reference: https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/Statements/SAVEPOINT.htm
QUESTION 202
Examine the data in the EMPLOYEES table.
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Which statement will compute the total annual compensation for each employee?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
QUESTION 203
Examine the description of the ORDER_ITEMS table:
A. quantity, unit_price
B. quantity * unit_price
C. quantity
D. total_paid
E. product_id
Correct Answer: BD
Section: (none)
Explanation
Explanation/Reference:
Explanation:
Sample
SELECT tr_sub.cur_tt, tr_sub.item, sum(tr.quantity), sum(tr.quantity*tr.unit_price)
FROM
(SELECT tr1.transaction_time as cur_tt, max(tr2.transaction_time) as prev_tt, tr1.item as item,
IF (tr1.unit_price=tr2.unit_price, tr1.unit_price, tr2.unit_price) as t_p
FROM transactions tr1 LEFT JOIN transactions tr2 ON
tr1.transaction_time>=tr2.transaction_time AND tr1.item=tr2.item
GROUP BY tr1.item, tr1.transaction_time, t_p
Reference: https://stackoverflow.com/questions/50771172/sql-query-get-total-value-based-on-different-unit-price-quantity-at-different-ti
QUESTION 204
Examine the data in the PRODUCTS table:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Examine these queries:
A. 1 and 2
B. 1 and 3
C. 1, 2, and 3
D. 2 and 3
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
Reference: https://www.dofactory.com/sql/where-any-all (statement 2 syntax in wrong)
QUESTION 205
Which two are true about scalar subquery expressions? (Choose two.)
Correct Answer: AD
Section: (none)
Explanation
Explanation/Reference:
QUESTION 206
Examine this partial statement:
Which is true?
A. Both the query and the subquery can select any number of rows.
B. The query can select only zero rows or one row, but the subquery can select any number of rows.
C. Both the query and the subquery can select only zero rows or one row.
D. The query can select any number of rows, but the subquery can select only zero rows or one row.
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Reference: http://dcx.sybase.com/1200/en/dbusage/ug-subquery-s-4318996.html
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2
QUESTION 207
Examine this data in the EMPLOYEES table:
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
https://www.gratisexam.com/
https://www.gratisexam.com/
885CB989129A5F974833949052CFB2F2