Exam 1Z0-071: IT Certification Guaranteed, The Easy Way!
Exam 1Z0-071: IT Certification Guaranteed, The Easy Way!
Exam 1Z0-071: IT Certification Guaranteed, The Easy Way!
Exam : 1Z0-071
Vendor : Oracle
Version : V15.75
1
IT Certification Guaranteed, The Easy Way!
NO.1 Which three statements are true about inner and outer joins?
A. A full outer join returns matched and unmatched rows.
B. A full outer join must use Oracle syntax.
C. Outer joins can be used when there are multiple join conditions on two tables.
D. Outer joins can only be used between two tables per query.
E. An inner join returns matched rows.
F. A left or right outer join returns only unmatched rows.
Answer: A,C,E
2
IT Certification Guaranteed, The Easy Way!
relationship
E. A one-to-many relatonship in one direction is a one-to-one relationship in the other direction
Answer: A,C
NO.7 Table EMPLOYEES contains columns including EMPLOYEE_ID, JOB_ID and SALARY.
Only the EMPLOYEES_ID column is indexed.
Rows exist for employees 100 and 200.
Examine this statement:
UPDATE employees
SET (job_id, salary) =
(SELECT job_id, salary
FROM employees
WHERE employee_id = 200)
WHERE employee id=100;
Which two statements are true?
A. Employees 100 and 200 will have the same SALARY as before the update command.
B. Employee 100 will have SALARY set to the same value as the SALARY of employee 200.
C. Employee 100 will have JOB_ID set to the same value as the JOB_ID of employee 200.
D. Employees 100 and 200 will have the same JOB ID as before the update command.
E. Employee 200 will have SALARY set to the same value as the SALARY of employee 100.
F. Employee 200 will have JOB_ID set to the same value as the JOB_ID of employee 100
Answer: B,C
3
IT Certification Guaranteed, The Easy Way!
4
IT Certification Guaranteed, The Easy Way!
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.
Which query should be used?
A. SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT
FROM customers
WHERE cust income_level !=NULL
AND cust credit_level !=NULL;
B. SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT
FROM customers
WHERE cust income_level IS NOT NULL
AND due_amount IS NOT NULL;
C. SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT
FROM customers
WHERE cust income_level <> NULL
AND due_amount <> NULL;
D. SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT
FROM customers
WHERE cust_income_level IS NOT NULL
AND cust_credit_limit IS NOT NULL;
E. SELECT cust_first_name, cust_credit_limit * . 05 AS DUE AMOUNT
FROM customers
WHERE cust income_level !=NULL
AND due_amount !=NULL;
Answer: D
5
IT Certification Guaranteed, The Easy Way!
E. Their metadata and actual data are both stored outside the database.
Answer: B,C
NO.16 Which three statements are true about GLOBAL TEMPORARY TABLES?
A. A GLOBAL TEMPORARY TABLE cannot have PUBLIC SYNONYM.
B. A GLOBAL TEMPORARY TABLE can have multiple indexes
C. A GLOBAL TEMPORARY TABLE can be referenced in the defining query of a view.
D. Data Manipulation Language (DML) on GLOBAL TEMPORARY TABLES generates no REDO.
E. A GLOBAL TEMPORARY TABLE can have only one index.
F. A trigger can be created on a GLOBAL TEMPORARY TABLE
Answer: B,C,F
6
IT Certification Guaranteed, The Easy Way!
NO.18 Which three statements are true about Data Manipulation Language (DML)?
A. delete statements can remove multiple rows based on multiple conditions.
B. insert statements can insert nulls explicitly into a column.
C. insert into. . .select. . .from statements automatically commit.
D. DML statements require a primary key be defined on a table.
E. update statements can have different subqueries to specify the values for each updated column.
Answer: A,B,E
7
IT Certification Guaranteed, The Easy Way!
D. SELECT *
FROM emp80
WHERE department_id=90;
Answer: A
NO.22 Which two queries return the string Hello! we're ready?
A. SELECT q'! Hello! We're ready! 'FROM DUAL;
B. SELECT "Hello! We're ready "FROM |DUAL;
C. SELECT q'[Hello! We're ready]'FROM DUAL;
D. SELECT 'Hello! we\ re ready' ESCAPE'N'FROMDUAL:
E. SELECT 'Hello! We're ready' FROM DUAL;
Answer: A,C
NO.23 which three statements are true about indexes and their administration in an Oracle
database?
A. The same table column can be part of a unique and non-unique index
B. A DESCENDING INDEX IS A type of function-based index
C. A DROP INDEX statement always prevents updates to the table during the drop operation
D. AN INVISIBLE INDEX is not maintained when DML is performed on its underlying table.
E. AN INDEX CAN BE CREATED AS part of a CREATE TABLE statement
F. IF a query filters on an indexed column then it will always be used during execution of query
Answer: B,C,E
NO.24 Which three statements are true about views in an Oracle database?
A. The WITH CHECK clause prevents certain rows from being displayed when querying the view.
B. The WITH CHECK clause prevents certain rows from being updated or inserted.
C. Tables in the defining query of a view must always exist in order to create the view.
D. Date Manipulation Language (DML) can always be used on views.
E. Deleting one or more rows using a view whose defining query contains a GROUP BY clause will
cause an error.
F. Views can be updated without the need to re-grant privileges on the view.
G. Inserting one or more rows using a view whose defining query contains a GROUP BY clause will
cause an error.
Answer: B,E,F
8
IT Certification Guaranteed, The Easy Way!
deptno NUMBER,
CONSTRAINT emp_fkey FOREIGN KEY (deptno) REFERENCES dept (deptno) DISABLE);
ALTER TABLE emp MODIFY CONSTRAINT emp_fkey ENABLE;
Which two are true?
A. The MGR column in the DEPT table will not be able to contain NULL values.
B. The CREATE TABLE EMP statement must precede the CREATE TABLE DEPT statement for all
threestatements to execute successfully.
C. Both foreign key constraint definitions must be removed from the CREATE TABLE statements,
andbe added with ALTER TABLE statements once both tables are created, for the two CREATE
TABLEstatements to
execute successfully in the order shown.
D. The DEFT FKEY constraint definition must be removed from the CREATE TABLE DEF statement.and
be added with an AITER TABLE statement once both tables are created, for the two CREATE TABLE
statements
to execute successfully in the order shown.
E. The Deptno column in the emp table will be able to contain nulls values.
F. All three statements execute successfully in the order shown
Answer: D,E
NO.27 An Oracle database server session has an uncommitted transaction in progress which
updated 5000 rows
in a table.
In which three situations does the transact ion complete thereby committing the updates?
A. When the session logs out is successfully
B. When a DBA issues a successful SHUTDOWN IMMEDIATE statement and the user then issues a
COMMIT
C. When a CREATE INDEX statement is executed successfully in same session
D. When a COMMIT statement is issued by the same user from another session in the same database
instance
E. When a CREATE TABLE AS SELECT statement is executed unsuccessfully in the same session
F. When a DBA issues a successful SHUTDOWN TRANSACTIONAL statement and the user, then issues
a COMMIT
Answer: A,C,F
9
IT Certification Guaranteed, The Easy Way!
NO.28 Which three statements are true about dropping and unused columns in an Oracle database?
A. A primary key column referenced by another column as a foreign key can be dropped if using the
CASCADE option.
B. A DROP COLUMN command can be rolled back.
C. An UNUSED column's space is remained automatically when the block containing that column is
next queried.
D. An UNUSED column's space is remained automatically when the row containing that column is
next queried.
E. Partition key columns cannot be dropped.
F. A column that is set to NNUSED still counts towards the limit of 1000 columns per table.
Answer: A,E,F
10
IT Certification Guaranteed, The Easy Way!
11
IT Certification Guaranteed, The Easy Way!
NO.36 Which three statements are true about GLOBAL TEMPORARY TABLES?
A. GLOBAL TEMPORARY TABLE rows inserted by a session are available to any other session whose
user has been granted select on the table.
B. A TRUNCATE command issued in a session causes all rows In a GLOBAL TEMPORARY TABLE for the
issuing session to be deleted.
C. A DELETE command on a GLOBAL TEMPORARY TABLE cannot be rolled back.
D. A GLOBAL TEMPORARY TABLE's definition is available to multiple sessions.
E. Any GLOBAL TEMPORARY TABLE rows existing at session termination will be deleted.
F. GLOBAL TEMPORARY TABLE space allocation occurs at session start.
Answer: B,D,F
NO.37 Which three statements are true regarding single row subqueries?
A. They must be placed on the left side of the comparison operator or condition.
B. They must return a row to prevent errors in the SQL statement.
C. A SQL statement may have multiple single row subquery blocks.
D. They can be used in the HAVING clause.
E. They must be placed on the right side of the comparison operator or condition.
F. They can be used in the clause.
Answer: C,D,F
NO.38 Which two statements are true about the DUAL table?
A. It can display multiple rows and columns.
B. It can be accessed only by the SYS user.
C. It can be accessed by any user who has the SELECT privilege in any schema
D. It can display multiple rows but only a single column.
E. It consists of a single row and single column of VARCHAR2 data type.
F. It can be used to display only constants or pseudo columns.
12
IT Certification Guaranteed, The Easy Way!
Answer: A,C
NO.39 You own table DEPARTMENTS, referenced by views, indexes, and synonyms.
Examine this command which executes successfully:
DROP TABLE departments PURGE;
Which three statements are true?
A. Neither can it be rolled back nor can the DEPARTMENTS table be recovered.
B. It will remove all views that are based on the DEPARTMENTS table.
C. It will delete all rows from the DEPARTMENTS table, but retain the empty table.
D. It will remove the DE PARTMENTS table from the database.
E. It will remove all synonyms for the DEPARTMENTS table.
F. It will drop all indexes on the DEPARTMENTS table.
Answer: A,D,F
Which two queries return rows for employees whose manager works in a different department?
A. SELECT emp. *
FROM employees emp
WHERE manager_ id NOT IN (
SELECT mgr.employee_ id
FROM employees mgr
WHERE emp. department_ id < > mgr.department_ id
);
B. SELECT emp.*
FROM employees emp
WHERE NOT EXISTS (
SELECT NULL
FROM employees mgr
WHERE emp.manager id = mgr.employee_ id
AND emp.department_id<>mgr.department_id
);
C. SELECT emp.*
FROM employees emp
LEFT JOIN employees mgr
ON emp.manager_ id = mgr.employee_ id
AND emp. department id < > mgr. department_ id;
D. SELECT emp. *
FROM employees emp
RIGHT JOIN employees mgr
13
IT Certification Guaranteed, The Easy Way!
NO.42 The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2.
The table has two rows whose COST_LAST_MANE values are Anderson and Ausson.
Which query produces output for CUST_LAST_SAME containing Oder for the first row and Aus for the
second?
A. SELECT REPLACE (REPLACE(cust_last_name,'son',''),'An','O') FROM customers;
B. SELECT REPLACE (TRIM(TRALING'son' FROM cust_last_name),'An','O') FROM customers;
C. SELECT INITCAP (REPLACE(TRIM('son' FROM cust_last_name),'An','O')) FROM customers;
D. SELECT REPLACE (SUBSTR(cust_last_name,-3),'An','O') FROM customers;
Answer: A
NO.43 The INVOICE table has a QTY_SOLD column of data type NUMBER and an INVOICE_DATE
column of data type DATE NLS_DATE_FORMAT is set to DD-MON-RR.
14
IT Certification Guaranteed, The Easy Way!
Which two are true about data type conversions involving these columns in query expressions?
A. invoice_date> '01-02-2019': uses implicit conversion
B. qty_sold ='05549821 ': requires explicit conversion
C. CONCAT(qty_sold, invoice_date): requires explicit conversion
D. qty_sold BETWEEN '101' AND '110': uses implicit conversion
E. invoice_date = '15-march-2019': uses implicit conversion
Answer: D,E
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.
Examine this partial query:
SELECT cust_last_nare, cust_credit_limit FROM customers
Which two WHERE conditions give the required result?
A. WHERE UPPER(cust_last_name) IN ('A%', 'B%') AND cust_credit_limit < 1000:
B. WHERE (INITCAP(cust_last_name) LIKE 'A%' OR ITITCAP(cust_last_name) LIKE 'B%') AND
cust_credit_limit < 1000
C. WHERE UPPER(cust_last_name) BETWEEN UPPER('A%' AND 'B%') AND ROUND(cust_credit_limit) <
1000;
D. WHERE (UPPER(cust_last_name) LIKE 'A%' OR UPPER(cust_last_name) LIKE 'B%') AND
ROUND(cust_credit_limit) < 1000;
E. WHERE (UPPER(cust_last_name) like INITCAP ('A') OR UPPER(cust_last_name) like INITCAP('B'))
AND ROUND(cust_credit_limit) < ROUND(1000) ;
Answer: B,D
15
IT Certification Guaranteed, The Easy Way!
16
IT Certification Guaranteed, The Easy Way!
Which two queries return all rows for employees whose salary is greater than the average salary in
their department?
A. SELECT "
FROM employees
WHERE salary > ANY
SELECT AVG (salary)
EROM employees
GROUP BY department_ id);
17
IT Certification Guaranteed, The Easy Way!
B. SELECT
FROM employees
WHERE salary > AVG (salary) OVER (PARTITION BY department _ id);
C. SELECT"
FROM employees e1
WHERE salary >!
SELECT AVG (salary)
FROM employees e2
WHERE e1. Department _id = e2, department_ id
D. SELECT.
FROM
SELECT e.", AVG (salary) OVER (PARTITION BY department id) avg_ sal
FROM employees e
WHERE salary > avg_ sal;
E. SELECT"
FROM employees
WHERE salary >
( SELECT AVG
(salary) FROM
employees
GROUP BY department _ id
Answer: C,D
NO.50 Which three statements are true about the DESCRIBE command?
A. It can be used from SQL Developer.
B. It can be used to display the structure of an existing view.
C. It can be used only from SQL*Plus.
D. It displays the NOT NULL constraint for any columns that have that constraint.
E. It displays all constraints that are defined for each column.
F. It displays the PRIMARY KEY constraint for any column or columns that have that constraint.
Answer: A,B,D
18
IT Certification Guaranteed, The Easy Way!
NO.54 Which three statements are true about time zones, date data types, and timestamp data
types in an Oracle database?
A. The DBTIMEZONE function can return an offset from Universal Coordinated Time (UTC)
B. A TIMESTAMP WITH LOCAL TIMEZONE data type column is stored in the database using the time
zone of the session that inserted the row
C. A TIMESTAMP data type column contains information about year, month, and day
D. The SESSIONTIMEZONE function can return an offset from Universal Coordinated Time (UTC)
E. The CURRENT_TIMESTAMP function returns data without time zone information
Answer: A,B,D
Which statement will compute the total annual compensation for each employee?
19
IT Certification Guaranteed, The Easy Way!
A. SELECT last _ NAME (monthly_ salary + monthly _commission _ pct) * 12 AS annual_ comp FROM
employees;
B. select last _ name, (monthly_ salary * 12) + (monthly_ salary * 12 *monthly_ commission_ pct) AS
annual_ camp FROM employees
C. SELECT last _ name, (monthly_ salary * 12) + (monthly_ salary * 12 * NVL (monthly_ commission
_pct, 0)) AS annual _comp
D. SELECT last _ name, (monthly _ salary * 12) + (monthly_ commission _ pct * 12) AS FROM
employees;
Answer: C
NO.57 Which three actions can you perform by using the ORACLE DATAPUMP access driver?
A. Create a directory object for an external table.
B. Read data from an external table and load it into a table in the database.
C. Query data from an external table.
D. Create a directory object for a flat file.
E. Execute DML statements on an external table.
F. Read data from a table in the database and insert it into an external table.
Answer: A,C,F
NO.59 Examine the description of the PRODCTS table which contains data:
20
IT Certification Guaranteed, The Easy Way!
Which statement will execute successfully, returning distinct employees with non-null first names?
A. SELECT DISTINCT * FROM employees WHERE first_ name IS NOT NULL;
B. SELECT first_ name, DISTNCT last_ name FROM employees WHERE first_ name IS NOT NULL;
C. SELECT Distinct * FROM employees WHERE first_ name < > NULL;
D. SELECT first_ name, DISTINCT last_ name FROM employees WHERE first_ name < > NULL;
Answer: A
NO.62 Which two statements are true about the ORDER BY clause?
21
IT Certification Guaranteed, The Easy Way!
A. Numeric values are displayed in descending order if they have decimal positions.
B. Only columns that are specified in the SELECT list can be used in the ORDER BY cause.
C. NULLS are not included in the sort operation.
D. Column aliases can be used In the ORDER BY cause.
E. Ina character sort, the values are case-sensitive.
Answer: D,E
NO.63 The ORDERS table has a primary key constraint on the ORDER_ID column.
The ORDER_ITEMS table has a foreign key constraint on the ORDER_ID column, referencing the
primary key of the ORDERS table.
The constraint is defined with on DELETE CASCADE.
There are rows in the ORDERS table with an ORDER_TOTAL less than 1000.
Which three DELETE statements execute successfully?
A. DELETE FROM orders WHERE order_total<1000;
B. DELETE * FROM orders WHERE order_total<1000;
C. DELETE orders WHERE order_total<1000;
D. DELETE FROM orders;
E. DELETE order_id FROM orders WHERE order_total<1000;
Answer: A,C,D
NO.64 You must find the number of employees whose salary is lower than employee 110.
Which statement fails to do this?
A. SELECT COUNT (*)
FROM employees
JOIN employees a
ON e. salary< a. salary
WHERE a. employee_ id= 110;
B. SELECT COUNT (* )
FROM employees
WHERE salary < (SELECT salary FROM employees WHERE employee.id =
110) ;
C. SELECT COUNT (*)
FROM employees e
JOIN (SELECT salary FROM employees WHERE employee_ id= 110) a
ON e. salary< a. salary;
D. SELECT COUNT (* )
FROM employees e
WHERE e. salary < (SELECT a. salary FROM employees a WHERE e. employee_ id = 110);
Answer: D
NO.65 The SYSDATE function displays the current Oracle Server date as:
21 -MAY-19
You wish to display the date as:
MONDAY, 21 MAY, 201 9
22
IT Certification Guaranteed, The Easy Way!
NO.68 Which two statements are true about the COUNT function?
A. It can only be used for NUMBER data types.
B. COUNT (DISTINCT inv_amt) returns the number of rows excluding rows containing duplicates and
NULLs in the INV_AMT column
C. COUNT(*) returns the number of rows in a table including duplicate rows and rows containing
NULLs in any column.
D. A SELECT statement using the COUNT function with a DISTINCT keyword cannot have a WHERE
clause.
E. COUNT(inv_amt) returns the number of rows in a table including rows with NULL in the INV_AMT
column.
Answer: B,C
NO.69 Which three statements are true about performing Data Manipulation Language (DML)
operations on a view In an Oracle Database?
23
IT Certification Guaranteed, The Easy Way!
24
IT Certification Guaranteed, The Easy Way!
FROM employees;
C. SELECT MAX (salary)
FROM employees
GROUP BY department_id;
D. SELECT MAX (salary)
FROM employees
GROUP BY department_id
HAVING MAX (salary) = MAX (MAX (salary));
E. SELECT MAX (MAX (salary))
FROM employees
GROUP BY department_id;
Answer: B,E
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.
Which query should be used?
A. SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMOUNT FROM customers
WHERE cust_income_level != NULL AND cust_credit_level != NULL;
B. SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers
WHERE cust_income_level <> NULL AND due_amount <> NULL;
C. SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers
WHERE cust_income_level IS NOT NULL AND cust_credit_limit IS NOT NULL;
D. SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers
WHERE cust_income_level IS NOT NULL AND due_amount IS NOT NULL;
E.
SELECT cust_first_name, cust_credit_limit * .05 AS DUE_AMONT FROM customers
WHERE cust_income_level != NULL AND due_amount != NULL;
Answer: C
NO.74 Which three statements are true about the Oracle join and ANSI Join syntax?
A. The Oracle join syntax only supports right outer joins,
B. The Oracle join syntax supports creation of a Cartesian product of two tables.
C. The SQL:1999 compliant ANSI join syntax supports natural joins.
D. The Oracle join syntax supports natural joins.
25
IT Certification Guaranteed, The Easy Way!
E. The Oracle join syntax performs better than the SQL:1999 compliant ANSI join syntax.
F. The SQL:1999 compliant ANSI join syntax supports creation of a Cartesian product of two tables.
G. The Oracle join syntax performs less well than the SQL:1999 compliant ANSI Join Answer.
Answer: B,C,F
NO.75 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. CURRENT DATE
B. CURRENT_ TIMESTAMP
C. SYSDATE
D. LOCALTIMESTAMP
Answer: B
26
IT Certification Guaranteed, The Easy Way!
NO.78 Which three are true about system and object privileges
A. WITH GRANT OPTION can be used when granting an object privilege to both users and roles
B. WITH GRANT OPTION cannot be used when granting an object privilege to PUBLIC
C. Revoking a system privilege that was granted with the WITH ADMIN OPTION has a cascading
effect.
D. Revoking an object privilege that was granted with the WITH GRANT OPTION clause has a
cascading effect
E. Adding a primary key constraint to an existing table in another schema requires a system privilege
F. Adding a foreign key constraint pointing to a table in another schema requires the REFERENCEs
object privilege
Answer: D,E,F
27
IT Certification Guaranteed, The Easy Way!
NO.82 Which three actions can you perform on an existing table containing date?
A. Add a new column as the table's first column.
B. Define a default value that is automatically inserted into a column containing nulls.
C. Add a new NOT NULL Column with a DEFAULT value.
D. Change a DATE Column containing data to a NUMBER data type.
E. Increase the width of a numeric column.
F. Change the default value of a column.
28
IT Certification Guaranteed, The Easy Way!
Answer: C,E,F
NO.83 Which two statements are true about the SET VERIFY ON command?
A. It displays values for variables created by the DEFINE command.
B. It can be used in SQL Developer and SQL*Plus.
C. It can be used only in SQL*plus.
D. It displays values for variables prefixed with &&.
E. It displays values for variables used only in the WHERE clause of a query.
Answer: C,D
NO.86 Which two statements are true about transactions in the Oracle Database server?
A. An uncommitted transaction commits automatically if the user exits SQL*Plus
B. Data Manipulation Language (DML) statements always start a new transaction.
C. A user can always see uncommitted updates made by the same user in a different session.
D. A Data Definition Language (DDL) statement does a commit automatically only for the data
dictionary updates caused by the DDL
E. A session can always see uncommitted updates made by itself.
F. If a session has an uncommitted transaction, then a DDL statement issue a COMMIT before
starting a new transaction.
Answer: A,E
29
IT Certification Guaranteed, The Easy Way!
NO.88 Which two are true about transactions in the Oracle Database?
A. A session can see uncommitted updates made by the same user in a different session.
B. A DDL statement issued by a session with an uncommitted transaction automatically Commits that
transaction.
C. DML statements always start new transactions.
D. DDL statements automatically commit only data dictionary updates caused by executing the DDL.
E. An uncommitted transaction is automatically committed when the user exits SQL*Plus.
Answer: B,E
NO.91 Which statement will return the last sequence number generated by the EMP_ SEQ
sequence?
A. SELECT NEXTVAL FROM emp_ seq;
B. SELECT CURRVAL FROM emp_ seq;
30
IT Certification Guaranteed, The Easy Way!
31
IT Certification Guaranteed, The Easy Way!
Which GROUP BY clause must be added so the query returns the results shown?
A. GROUP BY ch.channel_type, t.month, co.country code;
B. GROUP BY ch.channel_type,ROLLUP (t month, co. country_ code) ;
C. GROUP BY CUBE (ch. channel_ type, t .month, co. country code);
D. GROUP BYch. channel_ type, t.month,ROLIUP (co. country_ code) ;
Answer: B
32
IT Certification Guaranteed, The Easy Way!
ORDER BY 1, 2;
Answer: A
NO.98 The STORES table has a column START_DATE of data type DATE, containing the datethe row
was inserted.
You only want to display details of rows where START_DATEis within the last 25 months.which
WHERE clause can be used?
A. WHERE TO_NUMBER(start_date - SYSDATE)<=25
33
IT Certification Guaranteed, The Easy Way!
NO.100 Which two statements will convert the string Hello world to ello wozid?
A. SELECT LOWER (SUBSTR('Hello World, 2, 1)) FROM DUAL;
B. SELECT LOWER (SUBSTR('Hello World', 2)) FROM DUAL;
C. SELECT LOWER(TRIM('H' FROM 'Hello World')) FROM DUAL;
D. SELECT SUBSTR('Hello world', 2) FROM DUAL;
E. SELECT INITCAP(TRIM('H' FROM 'Hello World')) FROM DUAL;
Answer: B,C
NO.101 The CUSTOMERS table has a CUST_CREDT_LIMIT column of data type number.
Which two queries execute successfully?
A. SELECT TO_CHAR(NVL(cust_credit_limit * .15,'Not Available')) FROM customers;
B. SELECT NVL2(cust_credit_limit * .15,'Not Available') FROM customers;
C. SELECT NVL(cust_credit_limit * .15,'Not Available') FROM customers;
D. SLECT NVL(TO_CHAR(cust_credit_limit * .15),'Not available') from customers;
E. SELECT NVL2(cust_credit_limit,TO_CHAR(cust_credit_limit * .15),'NOT Available') FROM
customers;
Answer: D,E
34
IT Certification Guaranteed, The Easy Way!
NO.103 Which two statements are true about the rules of precedence for operators?
A. Arithmetic operators with equal precedence are evaluated from left to right within an expression.
B. Multiple parentheses can be used to override the default precedence of operators in an
expression.
C. The + binary operator has the highest precedence in an expression in a SQL statements.
D. NULLS influence the precedence of operators in an expression.
E. The concatenation operator || is always evaluated before addition and subtraction in an
expression.
Answer: A,B
NO.104 Which two statements are true about truncate and delete?
A. the result of a delete can be undone by issuing a rollback
B. delete can use a where clause to determine which row(s) should be removed.
C. TRUNCATE can use a where clause to determine which row(s) should be removed.
D. truncate leavers any indexes on the table in an UNUSABLE STATE.
E. the result of a truncate can be undone by issuing a ROLLBACK.
Answer: A,B
35
IT Certification Guaranteed, The Easy Way!
36
IT Certification Guaranteed, The Easy Way!
37
IT Certification Guaranteed, The Easy Way!
NO.111 Which two are true about the USING clause when joining tables?
A. All column names in a USING clause must be qualified with a table name or table alias.
B. It can never be used with onatural join.
C. It is used to specify an equijoin of columns that have the same name in both tables.
D. It can never be used with a full outer join.
E. It is used to specify an explicit join condition involving operators.
Answer: B,E
NO.112 You have been asked to create a table for a banking application.
One of the columns must meet three requirements:
1: Be stored in a format supporting date arithmetic without using conversion functions
2: Store a loan period of up to 10 years
3: Be used for calculating interest for the number of days the loan remains unpaid Which data type
should you use?
A. TIMESTAMP WITH TIMEZONE
B. TIMESTAMP
C. TIMESTAMP WITH LOCAL TIMEZONE
D. INTERVAL YEAR TO MONTH
E. INTERVAL DAY TO SECOND
Answer: E
NO.114 Which three are true about dropping columns from a table?
A. A column can be removed only if it contains no data.
B. A column drop is implicitly committed
C. A column that is referenced by another column in any other table cannot be dropped.
D. A column must be set as unused before it is dropped from a table.
E. A primary key column cannot be dropped.
F. Multiple columns can be dropped simultaneously using the ALTER TABLE command.
Answer: B,C,F
38
IT Certification Guaranteed, The Easy Way!
NO.116 Which three statements are true about Structured Query Language (SQL)?
A. It guarantees atomicity, consistency, isolation, and durability (ACID) features
B. It best supports relational databases
C. It is used to define encapsulation and polymorphism for a relational table
D. It requires that data be contained in hierarchical data storage
E. It is the only language that can be used for both relational and object-oriented databases
F. It provides independence for logical data structures being manipulated from the underlying
physical data storage
Answer: B,C,F
NO.117 Which two are true about multiple table INSERT statements?
A. They always use subqueries.
B. They can transform a row from a source table into multiple rows in a target table.
C. The conditional INSERT FIRST statement always inserts a row into a single table.
D. The conditional INSERT ALL statement inserts rows into a single table by aggregating source rows.
E. The unconditional INSERT ALL statement must have the same number of columns in both the
source and target tables.
Answer: A,B
NO.118 Which two statements are true about single row functions?
A. CONCAT: can be used to combine any number of values
B. MOD: returns the quotient of a division operation
C. CEIL: can be used for positive and negative numbers
D. FLOOR: returns the smallest integer greater than or equal to a specified number
E. TRUNC: can be used with NUMBER and DATE values
Answer: C,E
39
IT Certification Guaranteed, The Easy Way!
Which statement will compute the total annual compensation for each employee?
A. SELECT last name,
(monthly salary*12) + (monthly_commission_pct * 12) AS
annual comp
FROM employees
;
B. SELECT last_ name (monthly_ salary+ monthly_ commission _ pct) *12 AS annual_
FROM employees ;
C. SELECT last name, (monthly_ salary *12) + (monthly_ salary * 12 * NVL
(monthly commission pct,0) ) As annual _ comp
FROM employees;
D. SELECT last_ name, monthly_ salary*12) + (monthly_ salary * 12 * Monthly commission _Pct) AS
annual_ comp
FROM employees;
Answer: C
40
IT Certification Guaranteed, The Easy Way!
NO.122 Which two are true about transactions in the Oracle Database?
A. DDL statements automatically commit only data dictionary updates caused by executing the DDL.
B. A DDL statement issued by a session with an uncommitted transation automaticall commits that
transaction.
C. An uncommitted transaction is automatically committed when the user exits SQL*PLUS
D. DML statements always start new transactions.
E. A session can see uncommitted updates made by the same user in a different session
Answer: B,C
NO.123 In your session, the NLS._DAE_FORMAT is DD- MM- YYYY.There are 86400 seconds in
a day.Examine
this result:
DATE
02-JAN-2020
Which statement returns this?
A. SELECT TO_ CHAR(TO_ DATE('29-10-2019') +INTERVAL '2'; MONTH + INTERVAL '5'; DAY -
INTERVAL '86410' SECOND, ' DD-MON-YYYY') AS "date"
FROM DUAL;
B. SELECT TO_ CHAR(TO_ DATE('29-10-2019') + INTERVAL '3' MONTH + INTERVAL '7' DAY -
INTERVAL '360' SECOND, ' DD-MON-YYYY') AS "date"
FROM DUAL;
C. SELECT To CHAR(TO _DATE('29-10-2019') + INTERVAL '2' NONTH + INTERVAL '5' DAY
INEERVAL '120' SECOND, ' DD-MON-YYY) AS "date"
FROM DUAL;
D. SELECT-TO_CHAR(TO _DATE('29-10-2019'+ INTERVAL '2' MONTH+INTERVAL '6' DAYINTERVAL
'120' SECOND, 'DD-MON-YY') AS "daTe"
FROM DUAL;
E. SELECT-TO_CHAR(TO _DATE('29-10-2019'+ INTERVAL '2' MONTH+INTERVAL '4' DAYINTERVAL
'120' SECOND, 'DD-MON-YY') AS "daTe"
FROM DUAL;
Answer: C
41
IT Certification Guaranteed, The Easy Way!
42
IT Certification Guaranteed, The Easy Way!
NO.127 Which two statements are true regarding the UNION ALL operators?
A. NULLS are not ignored during duplicate checking.
B. Duplicates are eliminated automatically by the UNION ALL operator
C. The names of columns selected in each SELECT statement must be identical.
D. The number of columns selected in each SELECT statement must be identical
E. The output is sorted by the UNION ALL operator.
Answer: A,D
NO.129 Which three statements are true about built-in data types?
A. A VARCHAR2 blank-pads column values only if the data stored is non-numeric and contains no
special characters.
B. The default length for a CHAR column is always one character.
C. A VARCHAR2 column definition does not require the length to be specified.
D. A BLOB stores unstructured binary data within the database.
E. A CHAR column definition does not require the length to be specified.
F. A BFILE stores unstructured binary data in operating system files.
Answer: B,D,F
43
IT Certification Guaranteed, The Easy Way!
NO.131 Which statements is true about using functions in WHERE and HAVING?
A. using single-row functions in the WHERE clause requires a subquery
B. using single-row functions in the HAVING clause requires a subquery
C. using aggregate functions in the WHERE clause requires a subquery
D. using aggregate functions in the HAVING clause requires a subquery
Answer: A,D
NO.133 Which two statements are true about Oracle databases and SQL?
A. Updates performed by a database user can be rolled back by another user by using the ROLLBACK
command.
B. The database guarantees read consistency at select level on user-created tablers.
C. When you execute an UPDATE statement, the database instance locks each updated row.
44
IT Certification Guaranteed, The Easy Way!
NO.136 Table ORDER_ITEMS contains columns ORDER_ID, UNIT_PRICE and QUANTITY, of data type
NUMBER
Statement 1:
SELECT MAX (unit price*quantity) "Maximum Order FROM order items;
Statement 2:
SELECT MAX (unit price*quantity "Maximum order" FROM order items GROUP BY order id;
Which two statements are true?
A. Statement 2 returns only one row of output.
B. Both the statement given the same output.
C. Both statements will return NULL if either UNIT PRICE or QUANTITY contains NULL,
D. Statement 2 may return multiple rows of output.
E. Statement 1 returns only one row of output.
Answer: D,E
NO.137 Which two statements will return the names of the three employees with the lowest
salaries?
A. SELECT last_name, salary
FROM employees
WHERE ROWNUM<=3
B. SELECT last_name,salary
FROM employees
ORDER BY salary
FETCH FIRST 3 ROWS ONLY;
C. SELECT last_name,salary
45
IT Certification Guaranteed, The Easy Way!
FROM employees
WHERE ROWNUM<=3
ORDER BY (SELECT salary FROM employees);
D. SELECT last_name,salary
FROM (SELECT * FROM employees ORDER BY salary)
E. SELECT last_name,salary
FROM employees
FETCH FIRST 3 ROWS ONLY
ORDER BY salary;
Answer: B,D
46
IT Certification Guaranteed, The Easy Way!
NO.141 Which four statements are true regarding primary and foreign key constraints and the effect
they can have on table data?
A. Only the primary key can be defined at the column and table level.
B. The foreign key columns and parent table primary key columns must have the same names.
C. It is possible for child rows that have a foreign key to remain in the child table at the time the
parent row is deleted.
D. A table can have only one primary key but multiple foreign keys.
E. Primary key and foreign key constraints can be defined at both the column and table level.
F. A table can have only one primary key and one foreign key.
G. It is possible for child rows that have a foreign key to be deleted automatically from the child table
at the time the parent row is deleted
Answer: C,D,E,G
NO.142 Which two are true about granting object privileges on tables, views, and sequences?
A. DELETE can be granted on tables, views, and sequences.
B. REFERENCES can be grantrd only on tables.
C. INSERT can be granted only on tables and sequences.
D. SELECT can be granted on tables, views, and sequences.
E. ALTER can be granted only on tables and sequences.
Answer: D,E
47
IT Certification Guaranteed, The Easy Way!
NO.144 Whith three statements are true about built in data types?
A. A VARCHAR2 blank pads column values only if the data stored is non numeric and contains no
special characlers
B. A BFILE stores unstructured binary data in operating systerm files
C. A CHAR column definition does not require the length to be specified
D. The default length for a CHAR column is always one character
E. A VARCHAR2 column definition does not require the length to be specified
F. A BLOB stores unstructured binary data within the database
Answer: B,D,F
NO.146 Examine the data in the CUST_NAME column of the CUSTOMERS table:
CUST_NAME
---------------------
Renske Ladwig
Jason Mallin
Samuel McCain
Allan MCEwen
Irene Mikkilineni
Julia Nayer
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?
A. WHERE UPPER(SUBSTR(cust_name, INSTR(cust_name,' ') + 1)) LIKE UPPER('MC%')
B. WHERE SUBSTR(cust_name, INSTR(cust_name,' ') + 1) LIKE 'Mc%' OR 'MC%'
C. WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ') + 1)) IN ('MC%','Mc%')
D. WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ') + 1)) LIKE 'Mc%'
E. WHERE SUBSTR(cust_name, INSTR(cust_name,' ') + 1) LIKE 'Mc%'
Answer: A,D
NO.147 Which two statements will return the names of the three employees with the lowest
salaries?
A. SELECT last_ name, salary
FROM employees
FETCH FIRST 3 ROWS ONLY
48
IT Certification Guaranteed, The Easy Way!
ORDER BY salary;
B. SELECT last name, salary
FROM employees
ORDER BY salary
FETCE FIRST 3 RONS ONLY;
C. SELECT last_ name, salary
FBOM employees
WEERE
ORDER BY SELECT
ROINUM <= 3
salary FROM
employees);
D. SELECT last_ name, salary
FROM
(SELECT" FROM employees ORDER BY salary)
WHERE ROWNUM <=3
E. SELECT last_ name, salary
FROM employees
WHERE ROWNUM <=3
ORDER BY salary
Answer: B,D
49
IT Certification Guaranteed, The Easy Way!
Which two clauses are required for this command to execute successfully?
A. the DEFAULT DIRECTORY clause
B. the REJECT LIMIT clause
C. the LOCATION clause
D. the ACCESS PARAMETERS clause
E. the access driver TYPE clause
Answer: A,C
NO.150 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 Which query can be used?
A. SELECT emp_id,NEXT_DAY(ADD_MONTHS(hite_date,6),'MONDAY') FROM employees;
B. SELECT emp_id,ADD_MONTHS(hire_date,6), NEXT_DAY('MONDAY') FROM employees;
C. SELECT emp_id,NEXT_DAY(MONTHS_BETWEEN(hire_date,SYSDATE),6) FROM employees;
D. SELECT emp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),1) FROM employees;
Answer: A
NO.151 Which two statements are true about selecting related rows from two tables based on
entity relationship diagram (ERD)?
A. Relating data from a table with data from the same table is implemented with a self join.
B. An inner join relates rows within the same table.
C. Rows from unrelated tables cannot be joined.
D. Implementing a relationship between two tables might require joining additional tables.
E. Every relationship between the two tables must be implemented in a Join condition.
Answer: A,D
50
IT Certification Guaranteed, The Easy Way!
51
IT Certification Guaranteed, The Easy Way!
52
IT Certification Guaranteed, The Easy Way!
53
IT Certification Guaranteed, The Easy Way!
NO.162 Which three statements are true about sequences in a single instance Oracle database?
A. A sequence's unallocated cached values are lost if the instance shuts down.
B. Two or more tables cannot have keys generated from the same sequence.
C. A sequence number that was allocated can be rolled back if a transaction fails.
D. A sequence can issue duplicate values.
E. Sequences can always have gaps.
F. A sequence can only be dropped by a DBA.
Answer: A,D,E
NO.163 Which three statements are true about defining relations between tables in a relational
database?
A. Foreign key columns allow null values.
B. Unique key columns allow null values
C. Primary key columns allow null values.
D. Every primary or unique key value must refer to a matching foreign key value.
E. Every foreign key value must refer to a matching primary or unique key value.
Answer: A,B,E
NO.164 SELECT *
FROM bricks,colors;
Which two statements are true?
A. You can add an ON clause with a join condition.
B. You can add a WHERE clause with filtering criteria.
C. It returns the number of rows in BRICKS plus the number of rows in COLORS.
D. You can add a USING clause with a join condition.
E. It returnsthe same rows as SELECT * FROM bricks CROSS JOIN colors.
Answer: B,E
54
IT Certification Guaranteed, The Easy Way!
NO.166 The ORDERS table has a column ORDER_DATE of date type DATE The default display format
for a date is DD-MON-RR
Which two WHERE conditions demonstrate the correct usage of conversion functions?
A. WHERE ordet_date> TO_CHAR(ADD_MONTHS(SYSDATE, 6),'MON DD YYYY')
B. WHERE TO_CHAR(order_date,'MON DD YYYY') ='JAN 20 2019';
C. WHERE order_date> TO_DATE('JUL 10 2018','MON DD YYYY');
D. WHERE order_date IN (TO_DATE ('Oct 21 2018','MON DD YYYY'), TO_CHAR('Nov 21 2018','MON
DD YYYY'));
E. WHERE order_date> TO_DATE(ADD_MONTHS(SYSDATE,6),'MON DD YYYY');
Answer: B,C
NO.168 Which two statements are true about the WHERE and HAVING clauses in a SELECT
statement?
A. The WHERE clause can be used to exclude rows after dividing them into groups
B. WHERE and HAVING clauses can be used in the same statement only if applied to different table
columns.
C. The HAVING clause can be used with aggregating functions in subqueries.
55
IT Certification Guaranteed, The Easy Way!
D. Aggregating functions and columns used in HAVING clauses must be specified in these SELECT list
of a query.
E. The WHERE clause can be used to exclude rows before dividing them into groups.
Answer: C,E
NO.170 Which two are true about queries using set operators (UNION, UNION ALL, INTERSECT and
MINUS)?
A. There must be an equal number of columns in each SELECT list.
B. The name of each column in the first SELECT list must match the name of the corresponding
column in each subsequent SELECT list.
C. Each SELECT statement in the query can have an ORDER BY clause.
D. None of the set operators can be used when selecting CLOB columns.
E. The FOR UPDATE clause cannot be specified.
Answer: A,E
NO.172 In the PROMOTIONS table, the PROMO_ BEGIN_DATE column is of data type and the default
date format is DD-MON-RR
Which two statements are true about expressions using PROMO_ BEGIN_DATE in a query?
A. TONUMBER (PROMO BEGIN_DATE) - 5 will return a number
B. PROMO_ BEGIN_DATE - 5 will return a date
C. PROMO_ BEGIN_DATE - SYSDATE will return a number
D. PROMO_ BEGIN_DATE - SYSDATE will return an error
E. TODATE(PROMO BEGIN_DATE *5) will return a date
Answer: B,C
56
IT Certification Guaranteed, The Easy Way!
57
IT Certification Guaranteed, The Easy Way!
A. quantity
B. quantity, unit_price
C. total_paid
D. product_id
E. quantity * unit_price
Answer: C,E
58
IT Certification Guaranteed, The Easy Way!
NO.181 Which is true about the & and && prefixes with substitution variables?
A. & can prefix a substitution variable name only in queries. DML
B. An & prefix to an undefined substitution variable, which is referenced twice in the same query, will
prompt for a value twice .
C. The && prefix will not prompt for a value even if the substitution variable is not previously defined
in the session.
D. An && prefix to an undefined substitution variable, which is referenced multiple times in multiple
queries, will prompt for a value once per query.
E. Both & and && can prefix a substitution variable name in queries and DML statements.
Answer: B,E
NO.182 Which three statements are true about performing DML operations on a view with no
INSTEAD OF triggers defined?
A. Insert statements can always be done on a table through a view.
B. The WITH CHECK clause has no effect when deleting rows from the underlying table through the
view.
C. Delete statements can always be done on a table through a view.
D. 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.
E. 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.
F. Views cannot be used to add or modify rows in an underlying table If the defining query of the
view contains the DISTINCT keyword.
Answer: D,E,F
59
IT Certification Guaranteed, The Easy Way!
FROM employees
WHERE department_ id = 90
ORDER BY tenure ;
C. SELECT last_name, ROUND( (SYSDATE - hire_ date) 17) AS tenure
FROM employees
WHERE department_ id = 90
ORDER BY tenure DESC;
D. SELECT last_name, TRUNC ( (SYSDATE - - hire_ date) 1 7) AS tenure
FROM employees
WHERE department_id = 90
ORDER BY tenure DESC;
Answer: D
Rows exist in this table with data in all the columns. You put the PRODUCTS table in read-only mode.
Which three commands execute successfully on PRODUCTS?
A. ALTER TAELE products DROP COLUMN expiry_date;
B. CREATE INDEX price_idx on products (price);
C. ALTER TABLE products SET UNUSED(expiry_date);
D. TRUNCATE TABLE products;
E. ALTER TABLE products DROP UNUSED COLUMNS
F. DROP TABLE products
Answer: B,E,F
NO.185 Which two statements are true about date/time functions in a session where
NLS_DATE_PORMAT is set to DD-MON-YYYY SH24:MI:SS
A. SYSDATE can be used in expressions only if the default date format is DD-MON-RR.
B. CURRENT_TIMESTAMP returns the same date as CURRENT_DATE.
C. CURRENT_DATE returns the current date and time as per the session time zone
D. SYSDATE and CURRENT_DATE return the current date and time set for the operating system of the
database server.
E. CURRENT_TIMESTAMP returns the same date and time as SYSDATE with additional details of
functional seconds.
F. SYSDATE can be queried only from the DUAL table.
60
IT Certification Guaranteed, The Easy Way!
Answer: C,E
NO.186 Which two statements are true about INTERVAL data types
A. INTERVAL YEAR TO MONTH columns only support monthly intervals within a range of years.
B. The value in an INTERVAL DAY TO SECOND column can be copied into an INTERVAL YEAR TO
MONTH column.
C. INTERVAL YEAR TO MONTH columns only support monthly intervals within a single year.
D. The YEAR field in an INTERVAL YEAR TO MONTH column must be a positive value.
E. INTERVAL DAY TO SECOND columns support fractions of seconds.
F. INTERVAL YEAR TO MONTH columns support yearly intervals.
Answer: E,F
NO.189 Which two statements are true about a full outer join?
A. It includes rows that are returned by an inner join.
B. The Oracle join operator (+) must be used on both sides of the join condition in the WHERE clause.
C. It includes rows that are returned by a Cartesian product.
D. It returns matched and unmatched rows from both tables being joined.
E. It returns only unmatched rows from both tables being joined.
Answer: A,D
61
IT Certification Guaranteed, The Easy Way!
You want to display details of all customers who reside in cities starting with the letter D followed by
at least two character.
Which query can be used?
A. SELECT * FROM customers WHERE city ='D_%';
B. SELECT * FROM customers WHERE city ='%D_';
C. SELECT * FROM customers WHERE city LIKE'D %';
D. SELECT * FROM customers WHERE city LIKE'D_';
Answer: C
NO.191 In the PROMOTIONS table, the PROMO_BEGTN_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 in a query?
A. TO_NUMBER(PROMO_BEGIN_DATE)-5 will return number
B. TO_DATE(PROMO_BEGIN_DATE * 5) will return a date
C. PROMO_BEGIN_DATE-SYSDATE will return a number.
D. PROMO_BEGIN_DATE-5 will return a date.
E. PROMO_BEGIN_DATE-SYSDATE will return an error.
Answer: C,D
NO.192 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, I cust_id, order_date DEFAULT SYSDATE)
AS SELECT I prod_id,cust_id,time_id FROM sales.
Which statement is true regarding the above command?
A. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in
the column definition.
B. 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.
C. The NEW_SALES table would not get created because the column names in the CREATE TABLE
command and the SELECT clause I do not match.
D. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the
62
IT Certification Guaranteed, The Easy Way!
NO.193 Viev the Exhibit and examine the structure of the PRODUCT INFORMATION and
INVENTORIEStables.
You have a requirement from the supplies department to give a list containing PRODUCT
_ID,SUPPLIER ID, and QUANTITY_ON HAND for all the products where in QUANTITY ON HAND is
lessthan five.
Which two SQL statements can accomplish the task? (Choose two)
A. SELECT product id, quantity on hand, supplier id
FROM product information
NATURAL JOIN inventories AND quantity .on hand < 5;
B. SELECT i. product id, i. quantity .on hand, pi. supplier_id
FROM product_information pi JOIN inventories i
ON (pi. product. id=i. product id) AND quantity on hand < 5;
C. SELECT i. product_id, i. quantity_on hand, pi. supplier id
FROM product information pi JOIN inventories i USING (product id) AND quantity .on hand < 5;
D. SELECT i.product id, i. quantity on hand, pi. supplier id
FROM product information pi JOIN inventories i
ON (pi.product id=i. product id)WHERE quantity on hand < 5;
Answer: B,D
Which statement increases each employee's SALARY by the minimum SALARY for their
DEPARTM
ENT_ID?
A. UPDATE employees e1
SET salary =(SELECT e2. salary + MIN(e2.salary)
FROM employees e2
63
IT Certification Guaranteed, The Easy Way!
NO.196 Which two are true about external tables that use the ORACLE _DATAPUMP access driver?
A. Creating an external table creates a directory object.
B. When creating an external table, data can be selected only from a table whose rows are stored in
database blocks.
C. When creating an external table, data can be selected from another external table or from a table
whose rows are stored in database blocks.
D. Creating an external table creates a dump file that can be used by an external table in the same or
a different database.
E. Creating an external table creates a dump file that can be used only by an external table in the
same database.
Answer: B,D
64
IT Certification Guaranteed, The Easy Way!
65
IT Certification Guaranteed, The Easy Way!
NO.202 which three statements are true regarding single row subqueries?
A. THEY CAN BE USED in the where clause.
B. A SQL STATEMENT MAY HAVE MULTIPLE SINGLE ROW SUBQUERY BLOCKS.
C. THEY MUST BE PLACED ON THE RIGHT SIDE OF THE COMPARISON OPERATOR OR CONDITION.
D. they must be placed on the left side of the comparison operator or condition.
E. THEY CAN BE USED IN THE HAVING CLAUSE
F. they must return a row to prevent errors in the SQL statement.
Answer: A,B,E
NO.203 Which two are true about queries using set operators such as UNION?
A. An expression in the first SELECT list must have a column alias for the expression
B. CHAR columns of different lengths used with a set operator retum a vAacsua mhtoe e equals the
longest CHAR value.
C. Queries using set operators do not perform implicit conversion across data type groups (e.g.
character, numeric)
D. In a query containing multiple set operators INTERSECT always takes precedence over UNION and
UNION ALL
E. All set operators are valid on columns all data types.
Answer: C,E
66
IT Certification Guaranteed, The Easy Way!
NO.205 Which statement is true about the INTERSECT operator used in compound queries?
A. It processes NULLS in the selected columns.
B. INTERSECT is of lower precedence than UNION or UNION ALL.
C. It ignores NULLS.
D. Multiple INTERSECT operators are not possible in the same SQL statement.
Answer: A
67
IT Certification Guaranteed, The Easy Way!
D. 12
Answer: B
NO.208 Which three statements are true about views in an Oracle database?
A. A SELECT statement cannot contain a where clause when querying a view containing a WHERE
clause in its defining query
B. Rows inserted into a table using a view are retained in the table if the view is dropped
C. Views can join tables only if they belong to the same schema.
D. Views have no segment.
E. Views have no object number.
F. A view can be created that refers to a non-existent table in its defining query.
Answer: B,D,F
68
IT Certification Guaranteed, The Easy Way!
F. 3 01-JAN-2019
Answer: C,E
NO.212 Evaluate these commands which execute successfully CREATE SEQUENCE ord_seq
INCREMENT BY 1
START WITH 1
MAXVALUE 100000
CYCLE
CACHE 5000;
Create table ord_items(
ord_no number(4) default ord_seq.nextval not null,
Item_no number(3),
Qty number(3),
Expiry_date date,
Constraint it_pk primary key(ord_no,item_no),
Constraint ord_fk foreign key (ord_no) references orders(ord_no));
Which two statements are true about the ORD_ITEMS table and the ORD_SEQ sequence?
A. Any user inserting rows into table ORD_ITEMS must have been granted access to sequence
ORD_SEQ.
B. 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.
C. Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can cycle 20 times
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.
69
IT Certification Guaranteed, The Easy Way!
Answer: A,B
NO.213 Which is the default column or columns for sorting output from compound queries using
SET operators such as INTERSECT in a SQL statement?
A. The first column in the last SELECT of the compound query
B. The first NUMBER column in the first SELECT of the compound query
C. The first VARCHAR2 column in the first SELECT of the compound query
D. The first column in the first SELECT of the compound query
E. The first NUMBER or VARCHAR2 column in the last SELECTof the compound query
Answer: D
70
IT Certification Guaranteed, The Easy Way!
Answer: B,D
NO.217 Which two statements are true about the order by clause when used with a sql statement
containing a set operator such as union?
A. column positions must be used in the order by clause.
B. 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.
C. Each select statement in the compound query must have its own order by clause.
D. only column names from the first select statement in the compound query are recognized.
E. Each select statement in the compound query can have its own order by clause.
Answer: B,D
NO.219 Which two are true about creating tables in an Oracle database?
A. A create table statement can specify the maximum number of rows the table will contain.
71
IT Certification Guaranteed, The Easy Way!
B. The same table name can be used for tables in different schemas.
C. A system privilege is required.
D. Creating an external table will automatically create a file using the specified directory and file
name.
E. A primary key constraint is manadatory.
Answer: A,B
NO.222 Which three are true about granting object privileges on tables, views, and sequences?
A. UPDATE can be granted only on tables and views.
B. DELETE can be granted on tables, views, and sequences.
C. REFERENCES can be granted only on tables and views.
D. INSERT can be granted on tables, views, and sequences.
E. SELECT can be granted only on tables and views.
F. ALTER can be granted only on tables and sequences.
Answer: A,C,F
72
IT Certification Guaranteed, The Easy Way!
NO.224 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 . Which query can be used?
A. SELECT &col1, &col2
FROM &&table
WHERE &condition;
B. SELECT &col1, &col2
FROM "&table"
WHERE &condition;
C. SELECT &&col1,&&col2
FROM &table
WHERE &&condition= &&cond;
D. SELECT'&co11','&&co12'
FROM &table
WHERE'&&condition' ='&cond';
E.
SELECT&&col1, &&col2
FROM &table
WHERE &&condition;
Answer: A
73
IT Certification Guaranteed, The Easy Way!
74
IT Certification Guaranteed, The Easy Way!
75
IT Certification Guaranteed, The Easy Way!
You want to display the unique promotion costs in each promotion category.
Which two queries can be used?
A. SELECT promo_cost, | pxomo_category FROM promotions ORDER BY 1;
B. SELECT promo_category, DISTINCT promo_cost PROM promotions ORDER BY 2:
C. SELECT DISTINCT promo_category ||'has'|| promo_cost AS COSTS FROM promotions ORDER BY 1;
D. SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY 1;
E. SELECT DISTINCT promo_cost ||' in' II DISTINCT promo_category FROM promotions ORDER BY 1;
Answer: C,D
NO.231 Which three statements are true about performing DML operations on a view with no
Instead of triggers defined?
A. WITH CHECK clause has no effect when deleting rows from the underlying table through the view.
B. Insert statements can always be done on a table through a 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. Views cannot be used to add or modify rows in an underlying table if the defining query of the
view contains the DISTINCT keyword.
E. Delete statements can always be done on a table tough a view.
F. 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.
Answer: C,D,F
76
IT Certification Guaranteed, The Easy Way!
NO.232 Examine this Statement which returns the name of each employee and their manager,
SELECT e.last name AS emp,,m.last_name AS mgr
FROM employees e JOIN managers m
ON e.manager_ id = m. employee_ id ORDER BY emp;
You want to extend the query to include employees with no manager. What must you add before
JOIN to do this?
A. CROSS
B. FULL OUTER
C. LEFT OUTER
D. RIGHT OUTER
Answer: C
NO.233 The PRODUCT_INFORMATION table has a UNIT_PRICE column of data type NUMBER(8, 2).
Evaluate this SQL statement:
SELECT TO_CHAR(unit_price,'$9,999') FROM PRODUCT_INFORMATION;
Which two statements are true about the output?
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 1023.99 will be displayed as $1,023.
C. A row whose UNIT_PRICE column contains the value 10235.99 will be displayed as $1,0236.
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 10235.99 will be displayed as #####
Answer: A,E
NO.234 Which statement will return a comma-separated list of employee names in alphabetical
order for each department in the EMP table?
A. SELECT deptno,LISTAGG(ename, ' , ') WITHIN GROUP AS employee_list FROM emp GROUP BY
deptno;
B. SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP AS employee_list FROM emp GROUP BY
deptno ORDER BY ename;
C. SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP (GROUP BY deptno) AS employee_list FROM
emp ORDER BY ename;
D. SELECT deptno,LISTAGG(ename, ', ') WITHIN GROUP (ORDER BY ename) AS employee_list FROM
emp GROUP BY deptno;
Answer: D
77
IT Certification Guaranteed, The Easy Way!
NO.236 Which statements are true regarding primary and foreign key constraints and the effect
they can have on table data?
A. A table can have only one primary key but multiple foreign keys.
B. It is possible for child rows that have a foreign key to remain in the child table at the time the
parent row is deleted.
C. Primary key and foreign key constraints can be defined at both the column and table level.
D. Only the primary key can be defined the column and table level.
E. It is possible for child rows that have a foreign key to be deleted automatically from the child table
at the time the parent row is deleted.
F. The foreign key columns and parent table primary key columns must have the same names.
G. A table can have only one primary key and one foreign key.
Answer: A,B,C,E
78
IT Certification Guaranteed, The Easy Way!
F. A substitution variable prefixed with 6 prompts only once for a value in a session unless is set to
undefined in the session.
Answer: D,F
79
IT Certification Guaranteed, The Easy Way!
D. A new column with the name DEPARTMENT_ID can be added to the EMPLOYEES table.
E. No updates can be made to the data in the DEPARTMENT_ID column.
F. The DEPARTMENT_ID column can be recovered from the recycle bin
Answer: D,E
Which statement will compute the total annual compensation tor each employee?
A. SECECT last_namo, (menthy_salary + monthly_commission_pct) * 12 AS annual_comp
FROM employees;
B. SELCECT last_namo, (monthly_salary * 12) + (monthly_commission_pct * 12) AS annual_comp
FROM employees
C. SELCECT last_namo, (monthly_salary * 12) + (menthy_salary * 12 * NVL
(monthly_commission_pct, 0)) AS annual_comp FROM employees
D. SELCECT last_namo, (monthly_salary * 12) + (menthy_salary * 12 * monthly_commission_pct)
AS annual_comp FROM employees
Answer: C
NO.244 Which two are true about the precedence of opertors and condtions
A. + (addition) has a higher order of precedence than * (mliplpition)
B. NOT has a higher order of precedence than AND and OR in a condition.
C. AND and OR have the same order of precedence in a condition
D. Operators are evaluated before conditions.
E. || has a higher order of precedence than +(addition)
Answer: B,D
NO.245 You need to calculate the number of days from 1st January 2019 until today.
Dates are stored in the default format of DD-MON-RR.
Which two queries give the required output?
A. SELECT SYSDATE-TO_DATE ('01-JANUARY-2019') FROM DUAL;
B. SELECT TO_DATE (SYSDATE, 'DD/MONTH/YYYY')-'01/JANUARY/2019' FROM DUAL;
C. SELECT ROUND (SYSDATE-TO_DATE ('01/JANUARY/2019')) FROM DUAL;
D. SELECT TO_CHAR (SYSDATE, 'DD-MON-YYYY')-'01-JAN-2019' FROM DUAL;
E. SELECT ROUND (SYSDATE- '01-JAN-2019') FROM DUAL;
Answer: A,C
80
IT Certification Guaranteed, The Easy Way!
81
IT Certification Guaranteed, The Easy Way!
82
IT Certification Guaranteed, The Easy Way!
NO.252 View the Exhibit and examine the structure of the ORDERS table.
The columns ORDER_MODE and ORDER TOTAL have the default values'direct "and
respectively.
83
IT Certification Guaranteed, The Easy Way!
84
IT Certification Guaranteed, The Easy Way!
NO.256 Which two true about a sql statement using SET operations such as UNION?
A. The data type of each column returned by the second query must be implicitly convertible to the
data type of the corresponding column returned by the first query
B. The data type of each column retuned by the second query must exactly match the data type of
the corresponding column returned by the first query
C. The number, but not names, of columns must be identical for all SELECT statements in the query
D. The data type group of each column returned by the second query must match the data type
group of the corresponding column returned by the first query
E. The names and number of columns must be identical for all SELECT statements in the query.
Answer: A,C
The STATUS column contains the values IN STOCK or OUT OF STocK for each row.
Which two queries will execute successfully?
A. SELECT prod_id ||q'(' s not available)' 'CURRENT AVAILABILITY' FROM
product_ status WHERE status = 'OUT OF STOCK'
B. SELECT prod_id ||q"' s not available" FROM
85
IT Certification Guaranteed, The Easy Way!
86
IT Certification Guaranteed, The Easy Way!
87
IT Certification Guaranteed, The Easy Way!
88
IT Certification Guaranteed, The Easy Way!
C. 14
D. 42
Answer: C
NO.267 The SALES table has columns PROD_ID and QUANTITY_SOLD of data type NUMBER. Which
two queries execute successfully?
A. SELECT COUNT(prod_id) FROM sales WHERE quantity_sold>55000 GROUP BY prod_id;
89
IT Certification Guaranteed, The Easy Way!
B. SELECT prod_id FROM sales WHERE quantity_sold> 55000 GROUP BY prod_id HAVING COUNT(*)>
10;
C. SELECT COUNT(prod_id) FROM sales GROUP BY prod_id WHERE quantity_sold> 55000;
D. SELECT prod_id FROM sales WHERE quantity_sold> 55000 AND COUNT(*)> 10 GROUP BY
COUNT(*)> 10;
E. SELECT prod_id FROM sales WHERE quantity_sold> 55000 AND COUNT(*)> 10 GROUP BY prod_id
HAVING COUNT(*)> 10;
Answer: A,B
NO.268 Which two are true about the WITH GRANT OPTION clause?
A. The grantee can grant the object privilege to any user in the database, with of without including
this option.
B. The grantee must have the GRANT ANY OBJECT PRIVILEGE system prvilege to use this option.
C. It can be used when granting privileges to roles.
D. It can be used for system and object privileges.
E. It cannot be used to pass on privileges to PUBLIC by the grantee.
F. It can be used to pass on privileges to other users by the grantee.
Answer: A,F
NO.269 Which three are true about the CREATE TABLE command?
A. It can include the CREATE...INDEX statement for creating an index to enforce the primary key
constraint.
B. The owner of the table should have space quota available on the tablespace where the table is
defined.
C. It implicitly executes a commit.
D. It implicitly rolls back any pending transactions.
E. A user must have the CREATE ANY TABLE privilege to create tables.
F. The owner of the table must have the UNLIMITED TABLESPACE system privilege.
Answer: A,B,C
NO.270 Which three actions can you perform only with system privileges?
A. Truncate a table in another schema.
B. Access flat files via a database, which are stored in an operating system directory.
C. Log in to a database.
D. Query any table in a database.
E. Use the WITH GRANT OPTION clause.
F. Execute a procedure in another schema.
Answer: C,D,F
90
IT Certification Guaranteed, The Easy Way!
Which two methods should you use to prevent prompting for a hire date value when this query is
executed?
A. Use the DEFINE command before executing the query.
B. Store the query in a script and pass the substitution value to the script when executing it.
C. Replace'&1' with'&&1' in the query.
D. Execute the SET VERIFY OFF command before executing the query.
E. Use the UNDEFINE command before executing the query.
F. Execute the SET VERIFY ON command before executing the query.
Answer: A,B
NO.272 Examine the data in the CUST NAME column of the CUSTOMERS table:
CUST_NAME
------------------------------
Renske Ladwig
Jason Mallin
Samuel McCain
Allan MCEwen
Irene Mikkilineni
Julia Nayer
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?
A. WHERE INITCAP (SUBSTR(cust_name, INSTR(cust_name,'') +1)) IN ('MC%','Mc%)
B. WHERE UPPER (SUBSTR(cust_name, INSTR(cust_name, '') +1)) LIKE UPPER('MC%')
C. WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,'') +1)) LIKE'Mc%'
D. WHERE SUBSTR(cust_name,INSTR(cust_name,'') +1) LIKE'Mc%' OR'MC%'
E. WHERE SUBSTR(cust_name, INSTR(cust_name,'') +1) LIKE'Mc%'
Answer: B,C
91
IT Certification Guaranteed, The Easy Way!
NO.275 Which two statements are true about the results of using the intersect operator in
compound queries?
A. intersect ignores nulls.
B. Reversing the order of the intersected tables can sometimes affect the output.
C. Column names in each select in the compound query can be different.
D. intersect returns rows common to both sides of the compound query.
E. The number of columns in each select in the compound query can be different.
Answer: C,D
NO.276 Which three statements are true about indexes and their administration in an Oracle
database?
A. An INVISIBLE index is not maintained when Data Manipulation Language (DML) is performed on its
underlying table.
B. An index can be created as part of a CREATE TABLE statement.
C. A DROP INDEX statement always prevents updates to the table during the drop operation
D. A UNIQUE and non-unique index can be created on the same table column
E. A descending index is a type of function-based index
F. If a query filters on an indexed column then it will always be used during execution of the query
Answer: B,C,E
NO.277 You and your colleague Andrew have these privileges on the EMPLOYEE_RECORDS table:
1. SELECT
2. INSERT
3. UPDATE
4. DELETE
You connect to the database instance an perform an update to some of the rows in
EMPLOYEE_RECORDS, but don't commit yet.
Andrew connects to the database instance and queries the table
No othet user are accessing the table
Which two statements ate true at this point?
A. Andrew will be able to modify any rows in the table that have not been modified by your
transaction
B. Andrew will be unable to see the changes you have made
C. Andrew will be able to see the changes you habe made
D. Andrew will be unable to perform any INSERT, UPDATE of DELETE on the teble
E. Andrew will be able to SELECT from the table, but be unable to modify any existing rows.
Answer: A,B
92
IT Certification Guaranteed, The Easy Way!
NO.279 Which two statements are true about conditional INSERT ALL?
A. Each row returned by the subquery can be inserted into only a single target table.
B. It cannot have an ELSE clause.
C. The total number of rows inserted is always equal to the number of rows returned by the
subquery
D. A single WHEN condition can be used for multiple INTO clauses.
E. Each WHEN condition is tested for each row returned by the subquery.
Answer: C,E
NO.280 Which two actions can you perform with object privileges?
A. Create roles.
B. Delete rows from tables in any schema except sys.
C. Set default and temporary tablespaces for a user.
D. Create FOREIGN KEY constraints that reference tables in other schemas.
E. Execute a procedure or function in another schema.
Answer: B,D
The STATUS column contains the values 'IN STOCK' or 'OUT OF STOCK' for each row
Which two queries will execute successfully?
A. SELECT prod_id "CURRENT AVAILABILITY" || q'('s not available)' FROM product_status WHERE
status = 'OUT OF STOCK';
B. SELECT prod_id || q's not available'' FROM product_status WHERE status='OUT OF STOCK';
93
IT Certification Guaranteed, The Easy Way!
C. SELECT prod_id || q'('s not available)' "CURRENT AVAILABILITY" FROM product_status WHERE
status = 'OUT OF STOCK';
D. SELECT prod_id || q'('s not available)' FROM product_status WHERE status = 'OUT OF STOCK';
E. SELECT prod_id || q'('s not available)' 'CURRENT AVAILABILITY' FROM product_status WHERE
status = 'OUT OF STOCK';
F. SELECT prod_id || q"'s not available" FROM product_status WHERE status = 'OUT OF STOCK';
Answer: C,D
NO.283 Which three statements are true about multiple row subqueries?
A. They can contain HAVING clauses.
B. Two or more values are always returned from the subquery.
C. They cannot contain subquery.
D. They can return multiple columns.
E. They can contain GROUP BY clauses.
Answer: A,B,E
NO.285 Which two are true about the NVL, NVL2, and COALESCE functions?
A. The first expression in NVL2 is never returned.
B. NVL2 can have any number of expressions in the list.
C. COALESCE stops evaluating the list of expressions when it finds the first null value.
D. COALESCE stops evaluating the list of expressions when it finds the first non-null value.
E. NVL must have expressions of the same data type.
F. NVL can have any number of expressions in the list.
Answer: A,D
94
IT Certification Guaranteed, The Easy Way!
95
IT Certification Guaranteed, The Easy Way!
NO.291 Which three statements are true about single row functions?
A. They can be used only in the where clause of a select statement.
B. They can accept only one argument.
C. They return a single result row per table.
D. The argument can be a column name, variable, literal or an expression.
E. They can be nested to any level.
F. The date type returned can be different from the data type of the argument.
Answer: D,E,F
96
IT Certification Guaranteed, The Easy Way!
D. Line 5
Answer: C
NO.294 Which three actions can you perform by using the ALTER TABLE command?
A. Drop pseudo columns from a table.
B. Restrict all DML statements on a table.
C. Drop all columns simultaneously from a table.
D. Lock a set of rows in a table CE Rename a table.
97
IT Certification Guaranteed, The Easy Way!
E. Rename a table
F. Enable or disable constraints on a table.
Answer: D,E,F
NO.296 Which four statements are true about constraints on Oracle tables?
A. A Column can have only one CHECK Constraint.
B. A NOT NULL Constraint can be defined at the table level.
C. A UNIQUE constraint permits NULLS.
D. A PRIMARY KEY Constraint can be added after a table has been created and populated.
E. A CHECK Constraint can refer to values in other rows.
F. A UNIQUE Constraint can use a pre-existing index on the constrained column or columns.
G. A FOREIGN KEY Column can contain NULLS.
Answer: C,D,F,G
NO.298 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?
A. WHERE MONTHS_ BETWEEN (SYSDATE, start_ date) <= 25
B. WHERE MONTHS_ BETWEEN (start_ date, SYSDATE) <= 25
C. WHERE TO_ NUMBER (start_ date - SYSDATE) <= 25
D. WHERE ADD_ MONTHS (start_ date, 25) <= SYSDATE
Answer: A
98
IT Certification Guaranteed, The Easy Way!
99
IT Certification Guaranteed, The Easy Way!
NO.303 Which two statements are true about the ORDER BY clause?
A. Numeric values are displayed in descending order if they have decimal positions.
B. Only columns that are specified in the SELECT list can be used in the ORDER BY clause.
C. In a character sort, the values are case-sensitive.
D. Column aliases can be used in the ORDER BY clause.
E. NULLS are not included in the sort operation.
Answer: C,D
NO.304 View the Exhibits and examine the structure of the COSTS and PROMOTIONS tables.
100
IT Certification Guaranteed, The Easy Way!
You want to display PROD IDS whose promotion cost is less than the highest cost PROD ID in a pro
motion time interval.
Examine this SQL statement:
SELECT prod id
FROM costs
WHERE promo id IN
(SELECT promo id
FROM promotions
WHERE promo_cost < ALL
(SELECT MAX (promo cost)
FROM promotions
GROUP BY (promo_end date-promo_begin_date)) );
What will be the result?
A. It executes successfully but does not give the required result.
B. It gives an error because the ALL keyword is not valid.
C. It gives an error because the GROUP BY clause is not valid
D. It executes successfully and gives the required result.
Answer: A
101