Certy: Premium Exam Material
Certy: Premium Exam Material
(1z0-071)
You want to display the unique promotion costs in each promotion category.
Which two queries can be used? (Choose two.)
A. SELECT DISTINCT promo_category || ' has ' || promo_cost AS COSTS FROM promotions ORDER BY 1;
B. SELECT DISTINCT promo_cost || ' in ' || DISTINCT promo_category FROM promotions ORDER BY 1;
C. SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY 1;
D. SELECT promo_category DISTINCT promo_cost, FROM promotions ORDER BY 2;
E. SELECT promo_cost, promo_category FROM promotions ORDER BY 1;
Answer: AC
Explanation:
A. SELECT DISTINCT promo_category || ' has ' || promo_cost AS COSTS FROM promotions ORDER BY 1;
Question: 2 CertyIQ
Examine the description of the PRODUCTS table:
Answer: BCF
Explanation:
Question: 3 CertyIQ
What is true about non-equijoin statement performance? (Choose two.)
A. The BETWEEN condition always performs less well than using the >= and <= conditions.
B. The BETWEEN condition always performs better than using the >= and <= conditions.
C. The Oracle join syntax performs better than the SQL:1999 compliant ANSI join syntax.
D. Table aliases can improve performance.
E. The join syntax used makes no difference to performance.
Answer: DE
Explanation:
Question: 4 CertyIQ
Which two are true? (Choose two.)
Answer: AE
Explanation:
E. LAST_DAY returns the date of the last day of the month for the date argument passed to the function.
Question: 5 CertyIQ
Which three statements are true about Oracle synonyms? (Choose three.)
Answer: BCE
Explanation:
E. A synonym created by one user can refer to an object belonging to another user.
Question: 6 CertyIQ
Which two are true? (Choose two.)
Answer: AF
Explanation:
F. FLOOR returns the largest integer less than or equal to a specified number.
Question: 7 CertyIQ
Examine these SQL statements which execute successfully:
Which two statements are true after execution? (Choose two.)
Answer: AD
Explanation:
Question: 8 CertyIQ
Examine this SQL statement:
Answer: AD
Explanation:
D. The subquery is executed for every updated row in the ORDERS table.
Question: 9 CertyIQ
Which two statements are true about TRUNCATE and DELETE? (Choose two.)
A. DELETE can use a WHERE clause to determine which row(s) should be removed.
B. TRUNCATE can use a WHERE clause to determine which row(s) should be removed.
C. TRUNCATE leaves any indexes on the table in an UNUSABLE state.
D. The result of a TRUNCATE can be undone by issuing a ROLLBACK.
E. The result of a DELETE can be undone by issuing a ROLLBACK.
Answer: AE
Explanation:
A. DELETE can use a WHERE clause to determine which row(s) should be removed. ---> Is correct
B. TRUNCATE can use a WHERE clause to determine which row(s) should be removed. ---> Its wrong bcoz
truncate will delete every rows in a table except the table definitions.
C. TRUNCATE leaves any indexes on the table in an UNUSABLE state. ----> its wrong truncate will remove
everything except table definition or skeleton of the table
D. The result of a TRUNCATE can be undone by issuing a ROLLBACK.-----> Its wrong because TRUNCATE is a
ddl statement whereas it can be done for DELETE since its dml statement
E. The result of a DELETE can be undone by issuing a ROLLBACK. ----> Its correct because DELETE is DML
statement and each delete of row are recorded in transaction log or the redo logs.
Question: 10 CertyIQ
The STORES table has a column START_DATE of data type DATE, containing the date the row was inserted.
You only want to display details of rows where START_DATE is within the last 25 months.
Which WHERE clause can be used?
Explanation:
Question: 11 CertyIQ
You issue the following command to drop the PRODUCTS table:
SQL > DROP TABLE products;
Which three statements are true about the implication of this command? (Choose three.)
Answer: ABD
Explanation:
D. All views and synonyms on the table remain but they are invalidated.
Question: 12 CertyIQ
You execute the following commands:
SQL > DEFINE hiredate = '01-APR-2011'
SQL >SELECT employee_id, first_name, salary
FROM employees -
WHERE hire_date > '&hiredate'
AND manager_id > &mgr_id;
For which substitution variables are you prompted for the input?
Answer: D
Explanation:
Question: 13 CertyIQ
View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables. 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.
ORDER_ID -
Which DELETE statement would execute successfully?
Answer: C
Explanation:
Question: 14 CertyIQ
View the Exhibit and examine the structure of CUSTOMERS table.
Using the CUSTOMERS table, you need to generate a report that shows an increase in the credit limit by 15% for
all customers. Customers whose credit limit has not been entered should have the message "Not Available"
displayed.
Which SQL statement would produce the required result?
A.SELECT NVL (TO CHAR(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
B.SELECT TO_CHAR (NVL(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
C.SELECT NVL(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
D.SELECT NVL(cust_credit_limit), 'Not Available') "NEW CREDIT" FROM customers;
Answer: A
Explanation:
SELECT NVL (TO CHAR(cust_credit_limit * .15), 'Not Available') "NEW CREDIT" FROM customers;
Question: 15 CertyIQ
View the exhibit and examine the structures of the EMPLOYEES and DEPARTMENTS tables.
You want to update EMPLOYEES table as follows:
✑ Update only those employees who work in Boston or Seattle (locations 2900 and 2700).
✑ Set department_id for these employees to the department_id corresponding to London (location_id 2100).
✑ Set the employees' salary in location_id 2100 to 1.1 times the average salary of their department.
✑ Set the employees' commission in location_id 2100 to 1.5 times the average commission of their department.
You issue the following command:
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
Answer: D
Explanation:
Question: 16 CertyIQ
Evaluate the following two queries:
A.Performance would improve in query 2 only if there are null values in the CUST_CREDIT_LIMIT column.
B.There would be no change in performance.
C.Performance would degrade in query 2.
D.Performance would improve in query 2.
Answer: B
Explanation:
Question: 17 CertyIQ
Which is true about the ROUND, TRUNC and MOD functions?
A.TRUNC(MOD(25,3),-1) is invalid.
B.ROUND(MOD(25,3),-1) is invalid.
C.ROUND(MOD(25,3),-1) and TRUNC(MOD(25,3),-1) are both valid and give the same result.
D.ROUND(MOD(25,3),-1) and TRUNC(MOD(25,3),-1) are both valid but give different results.
Answer: C
Explanation:
ROUND(MOD(25,3),-1) and TRUNC(MOD(25,3),-1) are both valid and give the same result.
Question: 18 CertyIQ
View the Exhibit and examine the details of PRODUCT_INFORMATION table.
You have the requirement to display PRODUCT_NAME from the table where the CATEGORY_ID column has values
12 or 13, and the SUPPLIER_ID column has the value 102088. You executed the following SQL statement:
SELECT product_name -
FROM product_information -
WHERE (category_id = 12 AND category_id = 13) AND supplier_id = 102088;
Which statement is true regarding the execution of the query?
A.It would not execute because the same column has been used in both sides of the AND logical operator to
form the condition.
B.It would not execute because the entire WHERE clause condition is not enclosed within the parentheses.
C.It would execute and the output would display the desired result.
D.It would execute but the output would return no rows.
Answer: D
Explanation:
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.
Answer: AC
Explanation:
A. The outer query stops evaluating the result set of the inner query when the first value is found.
C. It is used to test whether the values retrieved by the outer query exist in the result set of the inner query.
References:
http://www.techonthenet.com/oracle/exists.php
Question: 20 CertyIQ
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;
Answer: C
Explanation:
Question: 21 CertyIQ
The BOOKS_TRANSACTIONS table exists in your database.
SQL>SELECT * FROM books_transactions ORDER BY 3;
What is the outcome on execution?
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.
Answer: D
Explanation:
D is correct. Works as long as there is a 3 column in the select list. If the number of columns in the table is 2
then the query would not execute. You'd get something like ORA-01785.Ascending is the default ORDER BY.
Question: 22 CertyIQ
Which two are true about the precedence of operators and conditions? (Choose two.)
Answer: CE
Explanation:
Reference:
https://docs.oracle.com/cd/E49933_01/server.770/es_eql/src/ceql_expr_precedence_rules.html#:~:text=
The%20rules%20are,the%20JOIN%20operators.
Question: 23 CertyIQ
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 of the managers and the second column would have LAST_NAME of the
employees.
LAST_NAME -
Which SQL statement would you execute?
Answer: B
Explanation:
Question: 24 CertyIQ
Which three statements are true about multiple-row subqueries?
Answer: ABE
Explanation:
E. They can contain group functions and GROUP BY and HAVING clauses.
Question: 25 CertyIQ
Examine the structure of the EMPLOYEES table.
A.SELECT e.last_name, m.manager_id FROM employees e RIGHT OUTER JOIN employees m on (e.manager_id =
m.employee_id) AND e.employee_id = 123;
B.SELECT e.last_name, m.manager_id FROM employees e LEFT OUTER JOIN employees m on (e.employee_id =
m.manager_id) WHERE e.employee_id = 123;
C.SELECT e.last_name, e.manager_id FROM employees e RIGHT OUTER JOIN employees m on (e.employee_id =
m.employee_id) WHERE e.employee_id = 123;
D.SELECT m.last_name, e.manager_id FROM employees e LEFT OUTER JOIN employees m on (e.manager_id =
m.manager_id) WHERE e.employee_id = 123;
Answer: D
Explanation:
SELECT m.last_name, e.manager_id FROM employees e LEFT OUTER JOIN employees m on (e.manager_id =
m.manager_id) WHERE e.employee_id = 123;
Question: 26 CertyIQ
Which normal form is a table in if it has no multi-valued attributes and no partial dependencies?
Answer: A
Explanation:
References:
https://blog.udemy.com/database-normal-forms/
Question: 27 CertyIQ
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 table, which are not present in the SALES2 table.
SALES1 -
Answer: D
Explanation:
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries004.htm
Question: 28 CertyIQ
Which two statements are true about conditional INSERT ALL? (Choose two.)
A.Each row returned by the subquery can be inserted into only a single target table.
B.A single WHEN condition can be used for multiple INTO clauses.
C.Each WHEN condition is tested for each row returned by the subquery.
D.It cannot have an ELSE clause.
E.The total number of rows inserted is always equal to the number of rows returned by the subquery.
Answer: BC
Explanation:
B.A single WHEN condition can be used for multiple INTO clauses.
C. Each WHEN condition is tested for each row returned by the subquery.
Reference:
https://oracle-base.com/articles/9i/multitable-inserts
Question: 29 CertyIQ
Evaluate the following SQL statements that are issued in the given order:
Answer: B
Explanation:
It would remain disabled and has to be enabled manually using the ALTER TABLE command.
Question: 30 CertyIQ
Which three statements are true regarding the data types? (Choose three.)
A.The minimum column width that can be specified for a VARCHAR2 data type column is one.
B.Only one LONG column can be used per table.
C.A TIMESTAMP data type column stores only time values with fractional seconds.
D.The BLOB data type column is used to store binary data in an operating system file.
E.The value for a CHAR data type column is blank-padded to the maximum defined column width.
Answer: ABE
Explanation:
A. The minimum column width that can be specified for a VARCHAR2 data type column is one.
E. The value for a CHAR data type column is blank-padded to the maximum defined column width.
ABE are correctC is incorrect because, although a TIMESTAMP can store values with up to a precision of 9 (a
nanosecond) it is not mandatory. D in incorrect because although a BLOB does store binary data, it does so
within the database, a BFILE stores information in an OS file.
Question: 31 CertyIQ
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.
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.
Answer: ACD
Explanation:
A. Multiple columns or expressions can be compared between the main query and subquery.
C.Main query and subquery can get data from different tables.
References:
http://docs.oracle.com/javadb/10.6.2.1/ref/rrefsqlj13658.html
Question: 32 CertyIQ
Which statement is true regarding the default behavior of the ORDER BY clause?
Answer: A
Explanation:
Question: 33 CertyIQ
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';
Answer: C
Explanation:
A. SELECT last_name, city FROM members WHERE state ='MO' AND state ='MI';should be OR, not ANDB.
SELECT last_name, city FROM members WHERE state LIKE 'M%';this gets Montana as well (MT)C. SELECT
last_name, city FROM members WHERE state IN ('MO', 'MI');CorrectD. SELECT DISTINCT last_name, city
FROM members WHERE state ='MO' OR state ='MI';loses duplicates.
Question: 34 CertyIQ
Which statement is true about an inner join specified in a query's WHERE clause?
Answer: B
Explanation:
Equijoin example:
WHERE a.working_area=c.cust_city;
Nonequijoin example:
Question: 35 CertyIQ
Which task can be performed by using a single Data Manipulation Language (DML) statement?
Answer: C
Explanation:
C is correct. The UNIQUE constraint does not treat NULLS as duplicative if more than one NULL exists on the
UNIQUE column. In other words, even with the UNIQUE constraint on a column, you can insert, update that
column to NULL on multiple rows without issues.
Question: 36 CertyIQ
Examine the structure of the BOOKS_TRANSACTIONS table:
You want to display the member IDs, due date, and late fee as $2 for all transactions.
Which SQL statement must you execute?
Answer: C
Explanation:
C is correctA column alias can not have spaces unless it is wrapped in double quotes.string literals have to be
wrapped in single quotes. so '$2' not $2 (which would be a number)lastly the AS clause is optional when
naming a column alias.
Question: 37 CertyIQ
In which three situations does a transaction complete?
Answer: CDE
Explanation:
A transaction ends when:- A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause.- A
user runs a DDL command such as CREATE, DROP, RENAME, or ALTER.- A user exits normally from most
Oracle Database utilities and tools, causing the current transaction to be implicitly committed. The commit
behavior when a user disconnects is application-dependent and configurable.A DELETE sentence and an
anonymous plsql block aren´t a DDL operation or a commit/rollback.T hen the right answers are the three DDL
sentences CDE.
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14220/transact.htm
Question: 38 CertyIQ
View the exhibit and examine the data in ORDERS_MASTER and MONTHLY_ORDERS tables.
MERGE_INTO orders_master o -
USING monthly_orders m -
ON (o.order_id = m.order_id)
Answer: B
Explanation:
References:
https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9016.htm
Question: 39 CertyIQ
Evaluate the following SQL statement:
SELECT product_name || 'it's not available for order'
FROM product_information -
WHERE product_status = 'obsolete';
You received the following error while executing the above query:
ERROR -
ORA-01756: quoted string not properly terminated
What would you do to execute the query successfully?
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
Answer: B
Explanation:
Use the escape character to negate the single quotation mark within the literal character string in the SELECT
clause.
Question: 40 CertyIQ
View the exhibit and examine the ORDERS table.
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?
Answer: C
Explanation:
ALTER TABLE orders MODIFY customer_id CONSTRAINT orders_cust_nn NOT NULL (customer_id);
Question: 41 CertyIQ
Examine the structure of the INVOICE table.
Answer: AC
Explanation:
Question: 42 CertyIQ
Which three statements are true about the ALTER TABLE....DROP COLUMN.... command?
A.A column can be dropped only if it does not contain any data.
B.A column can be dropped only if another column exists in the table.
C.A dropped column can be rolled back.
D.The column in a composite PRIMARY KEY with the CASCADE option can be dropped.
E.A parent key column in the table cannot be dropped.
Answer: BDE
Explanation:
Question: 43 CertyIQ
View the exhibit and examine the description of the PRODUCT_INFORMATION table.
Which SQL statement would retrieve from the table the number of products having LIST_PRICE as NULL?
Answer: B
Explanation:
only COUNT(*) includes NULL values. NVL(list, 0) says if list is NULL, return 0. This way it is included in the
count.
Question: 44 CertyIQ
Which three tasks can be performed using SQL functions built into Oracle Database?
Answer: ABC
Explanation:
Question: 45 CertyIQ
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;
What must be done to fix the statement?
Answer: D
Explanation:
Separate GRANT statements are required for the ORDERS and ORDER_ITEMS tables.
References:
http://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljgrant.html
Question: 46 CertyIQ
You are designing the structure of a table in which two columns have the specifications:
"" must be able to contain a maximum of 12 alphanumeric characters and must uniquely identify the row
COMPONENT_ID -
"" contains Century, Year, Month, Day, Hour, Minute, Second to the maximum precision and is used for calculations
and comparisons
EXECUTION_DATETIME -
between components.
Which two options define the data types that satisfy these requirements most efficiently? (Choose two.)
Answer: BE
Explanation:
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.
Answer: C
Explanation:
Question: 48 CertyIQ
Which two statements are true regarding the GROUP BY clause in a SQL statement? (Choose two.)
Answer: DE
Explanation:
D.Using the WHERE clause before the GROUP BY clause excludes the rows before creating groups.
E.If the SELECT clause has an aggregate function, then those individual columns without an aggregate
function in the SELECT clause should be included in the GROUP BY.
Question: 49 CertyIQ
Examine the description of the EMPLOYEES table:
For each employee in department 90 you want to display:
1. their last name
2. the number of complete weeks they have been employed
The output must be sorted by the number of weeks, starting with the longest serving employee first.
Which statement will accomplish this?
A.
B.
C.
D.
Answer: B
Explanation:
B , trunc retunr the number of complete weeks they have been employed.
B. Rounding up gives then employees extra days for their "complete" weeks.
Question: 50 CertyIQ
Examine the description of the PRODUCT_DETAILS table:
Which two statements are true? (Choose two.)
Answer: BF
Explanation:
B.PRODUCT_PRICE can be used in an arithmetic expression even if it has no value stored in it.
Question: 51 CertyIQ
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 -
SQL>SELECT faculty_name, COUNT(student_id)
Statement 2 -
SQL>SELECT faculty_name, COUNT(student_id)
FROM student NATURAL JOIN faculty
GROUP BY faculty_name;
Which statement is true regarding the outcome?
Answer: D
Explanation:
( col number(2));
(col varchar2(2));
Question: 52 CertyIQ
Which statement correctly grants a system privilege?
Answer: C
Explanation:
Answer is C
Reference:
https://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9013.htm#i2062318
Question: 53 CertyIQ
Which two statements are true regarding indexes? (Choose two.)
A.An update to a table can result in updates to any or all of the table's indexes.
B.An update to a table can result in no updates to any of the table's indexes.
C.A UNIQUE index can be altered to be non-unique.
D.When a table is dropped and is moved to the RECYCLE BIN, all indexes built on that table are permanently
dropped.
E.A table belonging to one user cannot have an index that belongs to a different user.
Answer: AB
Explanation:
A.An update to a table can result in updates to any or all of the table's indexes.
B.An update to a table can result in no updates to any of the table's indexes.
Question: 54 CertyIQ
Which two are true about queries using set operators (UNION, UNION ALL, INTERSECT and MINUS)? (Choose two.)
A.The name of each column in the first SELECT list must match the name of the corresponding column in each
subsequent SELECT list.
B.None of the set operators can be used when selecting CLOB columns.
C.There must be an equal number of columns in each SELECT list.
D.Each SELECT statement in the query can have an ORDER BY clause.
E.The FOR UPDATE clause cannot be specified.
Answer: BE
Explanation:
B. None of the set operators can be used when selecting CLOB columns.
Question: 55 CertyIQ
View the exhibit and examine the description of the DEPARTMENTS and EMPLOYEES tables.
You wrote this SQL statement to retrieve EMPLOYEE_ID, FIRST_NAME, and DEPARTMENT NAME, for all
employees:
SELECT employee_id, first_name, department_name
FROM employees -
NATURAL JOIN departments;
The desired output is not obtained after executing the above SQL statement. What could be the reason for this?
A.The table prefix is missing for the column names in the SELECT clause.
B.The NATURAL JOIN clause is missing the USING clause.
C.The DEPARTMENTS table is not used before the EMPLOYEES table in the FROM clause.
D.The EMPLOYEES and DEPARTMENTS tables have more than one column with the same column name and
data type.
Answer: D
Explanation:
Natural join needs only one column to be the same in each table. The EMPLOYEES and DEPARTMENTS tables
have two columns that are the same
(Department_ID and Manager_ID)
Question: 56 CertyIQ
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. > 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.
Answer: AD
Explanation:
A. When the MAXVALUE limit for a sequence is reached, it can be increased by using the ALTER SEQUENCE
statement. [correct]B. DELETE <sequence_ name> would remove a sequence from the database. [Incorrect:
DROP <sequence_name>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.[incorrect: The same sequence can be
used to insert data into multiple tables or views. ]D. CURRVAL is used to refer to the most recent sequence
number that has been generated for a particular sequence. [correct]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. [incorrect: Even the sequence wasn't used, the sequence number will get incremented in such
scenario.
References:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_2012.htm#SQLRF00817
https://docs.oracle.com/cd/A84870_01/doc/server.816/a76989/ch26.htm
Question: 57 CertyIQ
View the exhibit and examine the structure of the CUSTOMERS table.
Which two tasks would require subqueries or joins to be executed in a single statement?
A.finding the number of customers, in each city, whose credit limit is more than the average credit limit of all
the customers
B.finding the average credit limit of male customers residing in 'Tokyo' or 'Sydney'
C.listing of customers who do not have a credit limit and were born before 1980
D.finding the number of customers, in each city, whose marital status is 'married'.
E.listing of those customers, whose credit limit is the same as the credit limit of customers residing in the city
'Tokyo'.
Answer: AE
Explanation:
A.finding the number of customers, in each city, whose credit limit is more than the average credit limit of all
the customers.
E.listing of those customers, whose credit limit is the same as the credit limit of customers residing in the city
'Tokyo'.
Question: 58 CertyIQ
Which two statements are true about selecting related rows from two tables based on an Entity Relationship
Diagram (ERD)? (Choose two.)
Answer: BC
Explanation:
B.Relating data from a table with data from the same table is implemented with a self join.
C.Implementing a relationship between two tables might require joining additional tables.
Question: 59 CertyIQ
View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables.
You need to create a view that displays the ORDER_ID, ORDER_DATE, and the total number of items in each order.
Which CREATE VIEW statement would create the view successfully?
A.CREATE OR REPLACE VIEW ord_vu AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id) FROM orders
o JOIN order_items i ON (o.order_id = i.order_id) GROUP BY o.order_id, o.order_date;
B.CREATE OR REPLACE VIEW ord_vu (order_id, order_date) AS SELECT o.order_id, o.order_date, COUNT
(i.line_item_id) "NO OF ITEMS" FROM orders o JOIN order_items i ON (o.order_id = i.order_id) GROUP BY
o.order_id, o.order_date;
C.CREATE OR REPLACE VIEW ord_vu AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id) "NO OF
ITEMS" FROM orders o JOIN order_items i ON (o.order_id = i.order_id) GROUP BY o.order_id, o.order_date;
D.CREATE OR REPLACE VIEW ord_vu AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id) || "NO OF
ITEMS" FROM orders o JOIN order_items i ON (o.order_id = i.order_id) GROUP BY o.order_id, o.order_date
WHITH CHECK OPTION;
Answer: C
Explanation:
C.CREATE OR REPLACE VIEW ord_vu AS SELECT o.order_id, o.order_date, COUNT (i.line_item_id) "NO OF
ITEMS" FROM orders o JOIN order_items i ON (o.order_id = i.order_id) GROUP BY o.order_id, o.order_date;
Question: 60 CertyIQ
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.
Answer: C
Explanation:
The correct Answer is C :EQUI JOIN creates a JOIN for equality or matching column(s) values of the relative
tables. Example:SELECT student.name, student.id, record.class, record.cityFROM student, recordWHERE
student.city = record.city;The join is replaced by the comma '' FROM student, record ''NON EQUI JOIN
performs a JOIN using comparison operator other than equal(=) sign like >, <, >=, <= with conditions.Example
:SELECT student.name, record.id, record.cityFROM student, recordWHERE Student.id < Record.id ;We can
remplace "<" by another sign like >, <, >=, <= I hope it's clear.
Question: 61 CertyIQ
Which three statements are true about inner and outer joins? (Choose three.)
Answer: ABF
Explanation:
A. Option A is true. A full outer join returns both matched rows and unmatched rows from the joined tables.
Matched rows are those that satisfy the join condition, while unmatched rows are those that do not have a
matching row in the other table.
B. Option B is true. Outer joins can be used when there are multiple join conditions on two tables. This allows
for more complex join conditions and provides flexibility in joining tables based on multiple criteria.
F. Option F is true. An inner join returns only the matched rows from the joined tables. It filters out the
unmatched rows, resulting in a result set that contains only the rows that satisfy the join condition.
Question: 62 CertyIQ
Examine the following query:
SQL> SELECT prod_id, amount_sold
FROM sales -
ORDER BY amount_sold -
FETCH FIRST 5 PERCENT ROWS ONLY;
What is the output of this query?
A.It displays 5 percent of the products with the highest amount sold.
B.It displays the first 5 percent of the rows from the SALES table.
C.It displays 5 percent of the products with the lowest amount sold.
D.It results in an error because the ORDER BY clause should be the last clause.
Answer: C
Explanation:
References:
https://oracle-base.com/articles/12c/row-limiting-clause-for-top-n-queries-12cr1
Question: 63 CertyIQ
The first DROP operation is performed on PRODUCTS table using this command:
DROP TABLE products PURGE;
Then a FLASHBACK operation is performed using this command:
FLASHBACK TABLE products TO BEFORE DROP;
Which is true about the result of the FLASHBACK command?
Answer: D
Explanation:
It is not possible to recover the table structure, data, or the related indexes.
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_9003.htm
Question: 64 CertyIQ
These are the steps for a correlated subquery, listed in random order:
1. The WHERE clause of the outer query is evaluated.
2. A candidate row is fetched from the table specified in the outer query.
3. This is repeated for the subsequent rows of the table, until all the rows are processed.
4. Rows are returned by the inner query, after being evaluated with the value from the candidate row in the outer
query.
Which is the correct sequence in which the Oracle server evaluates a correlated subquery?
A.2, 1, 4, 3
B.4, 1, 2, 3
C.4, 2, 1, 3
D.2, 4, 1, 3
Answer: D
Explanation:
D is correct.Remember this is for a correlated subquery. Each outer query row provides input to run the
correlated subquery. The correlated subquery's result may be needed to evaluate the where clause.
References:
http://rajanimohanty.blogspot.co.uk/2014/01/correlated-subquery.html
Question: 65 CertyIQ
Evaluate the following query:
SQL> SELECT TRUNC (ROUND(156.00, -1),-1)
FROM DUAL;
What would be the outcome?
A.150
B.200
C.160
D.16
E.100
Answer: C
Explanation:
Correct answer is 160. Order of operations the round is done first if you round using a -1 it takes the number to
the nearest 10's so 156.00 becomes 160.
References:
https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions135.htm
https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2127.htm
Question: 66 CertyIQ
Examine this statement:
A.an error
B.2 rows
C.0 rows
D.1 row
Answer: D
Explanation:
Question: 67 CertyIQ
View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.
The PROD_ID column is the foreign key in the SALES table, 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.
Evaluate the following CREATE TABLE command:
CREATE TABLE new_sales (prod_id, cust_id, order_date DEFAULT SYSDATE)
AS -
SELECT prod_id, cust_id, time_id
FROM sales;
Which statement is true regarding the above command?
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.
Answer: A
Explanation:
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.
Question: 68 CertyIQ
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.
Answer: CD
Explanation:
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.
Question: 69 CertyIQ
An Oracle Database session has an uncommitted transaction in progress which updated 5000 rows in a table.
In which three situations does the transaction complete thereby committing the updates? (Choose three.)
A.when a CREATE TABLE AS SELECT statement is issued in the same session but fails with a syntax error
B.when a DBA issues a successful SHUTDOWN TRANSACTIONAL statement and the user then issues a
COMMIT
C.when the session logs out successfully
D.when a CREATE INDEX statement is executed successfully in the same session
E.when a DBA issues a successful SHUTDOWN IMMEDIATE statement and the user then issues a COMMIT
F.when a COMMIT statement is issued by the same user from another session in the same database instance
Answer: BCD
Explanation:
B .when a DBA issues a successful SHUTDOWN TRANSACTIONAL statement and the user then issues a
COMMIT.
Question: 70 CertyIQ
Which three statements are true? (Choose three.)
Answer: CDF
Explanation:
C. The usernames of all the users including database administrators are stored in the data dictionary.
D. The USER_CONS_COLUMNS view should be queried to find the names of columns to which constraints
apply.
F. Views with the same name but different prefixes, such as DBA, ALL and USER, reference the same base
tables from the data dictionary.
References:
https://docs.oracle.com/cd/B10501_01/server.920/a96524/c05dicti.htm
Question: 71 CertyIQ
View the exhibits and examine the structures of the COSTS and PROMOTIONS tables.
Evaluate the following SQL statement:
A.It displays prod IDs in the promo with the lowest cost.
B.It displays prod IDs in the promos with the lowest cost in the same time interval.
C.It displays prod IDs in the promos with the highest cost in the same time interval.
D.It displays prod IDs in the promos which cost less than the highest cost in the same time interval.
Answer: D
Explanation:
It displays prod IDs in the promos which cost less than the highest cost in the same time interval.
Question: 72 CertyIQ
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.
Which SQL statement would you execute to accomplish the task?
A.UPDATE dept d 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);
Answer: D
Explanation:
UPDATE dept d SET city = (SELECT city FROM locations l WHERE d.location_id = l.location_id);
Question: 73 CertyIQ
The BOOKS_TRANSACTIONS table exists in your schema in this database.
You execute this SQL statement when connected to your schema in your database instance.
SQL> SELECT * FROM books_transactions ORDER BY 3;
What is the result?
A.The execution fails unless the numeral 3 in the ORDER BY clause is replaced by a column name.
B.All table rows are displayed sorted in ascending order of the values in the third column.
C.The first three rows in the table are displayed in the order that they are stored.
D.Only the three rows with the lowest values in the key column are displayed in the order that they are stored.
Answer: B
Explanation:
All table rows are displayed sorted in ascending order of the values in the third column.
Question: 74 CertyIQ
Examine the description of the BRICKS table:
B.
C.
D.
E.
Answer: AD
Explanation:
AD is Correct answer.Use Minus operator to return all distinct rows selected by the first query, but not
present in the second query result set. In Minus operator, the number of columns must be the same and data
type of columns being selected by the SELECT statements in queries must belong to the same data type
group in all the SELECT statements used in the query. The names of the columns, however, need not be
identical.
Question: 75 CertyIQ
Table EMPLOYEES contains columns including EMPLOYEE_ID, JOB_ID and SALARY.
Only the EMPLOYEE_ID column is indexed.
Rows exist for employees 100 and 200.
Examine this statement:
A.Employees 100 and 200 will have the same SALARY as before the update command.
B.Employee 100 will have JOB_ID set to the same value as the JOB_ID of employee 200.
C.Employee 200 will have JOB_ID set to the same value as the JOB_ID of employee 100.
D.Employees 100 and 200 will have the same JOB_ID as before the update command.
E.Employee 100 will have SALARY set to the same value as the SALARY of employee 200.
F.Employee 200 will have SALARY set to the same value as the SALARY of employee 100.
Answer: BE
Explanation:
B. Employee 100 will have JOB_ID set to the same value as the JOB_ID of employee 200.
E. Employee 100 will have SALARY set to the same value as the SALARY of employee 200.
Question: 76 CertyIQ
View the Exhibit and examine the structure of the ORDER_ITEMS table.
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
Answer: D
Explanation:
Answer is D. The query with '=' will fail because the sub-query is returning more than one row. Therefore all
you need to do is replace '=' with 'IN' and the query will execute successfully and return the desired results.
Question: 77 CertyIQ
You want to return the current date and time from the user session, with a data type of TIMESTAMP WITH TIME
ZONE.
Which function will do this?
A.SYSDATE
B.CURRENT_TIMESTAMP
C.LOCALTIMESTAMP
D.CURRENT_DATE
Answer: B
Explanation:
Reference:
https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch4datetime.htm#NLSPG004
Question: 78 CertyIQ
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.
Which query would give the required result?
A.SELECT cust_income_level || "˜ ' || cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers.
B.SELECT DISTINCT cust_income_level || "˜ ' || cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers.
C.SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS "50% Credit Limit" FROM
customers.
D.SELECT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers
Answer: B
Explanation:
SELECT DISTINCT cust_income_level || "˜ ' || cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers.
Question: 79 CertyIQ
Which three statements are true regarding the SQL WHERE and HAVING clauses?
Answer: ADE
Explanation:
A.The HAVING clause conditions can have aggregating functions.(correct)B. The HAVING clause conditions
can use aliases for the columns.(Incorrect: The HAVING clause conditions can not use aliases for the
columns)C. The WHERE and HAVING clauses cannot be used together in a SQL statement.(Incorrect: The
WHERE and HAVING clauses can be used together in a SQL statement)D. The WHERE clause is used to
exclude rows before grouping data.(correct)E. The HAVING clause is used to exclude one or more aggregated
results after grouping data.(correct)
Question: 80 CertyIQ
Which two are true about queries using set operators such as UNION? (Choose two.)
A.In a query containing multiple set operators, INTERSECT always takes precedence over UNION and UNION
ALL.
B.An expression in the first SELECT list must have a column alias for the expression.
C.All set operators are valid on columns of all data types.
D.CHAR columns of different lengths used with a set operator return a VARCHAR2 whose length equals the
longest char value.
E.Queries using set operators do not perform implicit conversion across data type groups (e.g. character,
numeric).
Answer: DE
Explanation:
D.CHAR columns of different lengths used with a set operator return a VARCHAR2 whose length equals the
longest char value.
E.Queries using set operators do not perform implicit conversion across data type groups (e.g. character,
numeric).
Thank you
Thank you for being so interested in the premium exam material.
I'm glad to hear that you found it informative and helpful.
But Wait
I wanted to let you know that there is more content available in the full version.
The full paper contains additional sections and information that you may find helpful,
and I encourage you to download it to get a more comprehensive and detailed view of
all the subject matter.