Oracle Questions & Answers: Exam Information
Oracle Questions & Answers: Exam Information
Free Oracle Study Guide
Search
CheckPoint
Cisco
CIW
CompTIA
CWNP
ECCouncil
ISC2
Juniper
Linux
Microsoft
Oracle
Sun
VMWare
EMC
Exin
Isilon
PMI
HP
IBM
ISACA
Exam Information
RSS feed for this section
This category contains 246 posts
Which statement is true regarding the default behavior of the
ORDER BY clause?
Posted by seenagape on October 7, 2015 No comments
Which statement is true regarding the default behavior of the ORDER BY clause?
A.
In a character sort, the values are casesensitive
B.
NULL values are not considered at all by the sort operation
C.
Only those columns that are specified in the SELECT list can be used in the ORDER BY
clause
D.
Numeric values are displayed from the maximum to the minimum value if they have
decimal positions
Which is the correct output of the above query?
Posted by seenagape on October 7, 2015 2 comments
Evaluate the following SQL statements: Exhibit: Which is the correct output of the above
query?
A.
+2500, +5402, +00 11:12:10.123457
B.
+00300,+00650,+00 11:12:10.123457
C.
+00300, +5402,+00 11:12:10.123457
D.
+2500,+00650,+00 11:12:10.123457
What would be the outcome of the above statements?
Posted by seenagape on October 7, 2015 No comments
See the Exhibit and examine the structure of ORD table: Exhibit: Evaluate the following SQL
statements that are executed in a user session in the specified order: CREATE SEQUENCE
ord_seq; SELECT ord_seq.nextval FROM dual; INSERT INTO ord VALUES
(ord_seq.CURRVAL, ’25jan2007,101); UPDATE ord SET ord_no= ord_seq.NEXTVAL
WHERE cust_id =101; What would be the outcome of the above statements?
A.
All the statements would execute successfully and the ORD_NO column would contain
the value 2 for the CUST_ID 101.
B.
The CREATE SEQUENCE command would not execute because the minimum value
and maximum value for the sequence have not been specified.
C.
The CREATE SEQUENCE command would not execute because the starting value of
the sequence and the increment value have not been specified.
D.
All the statements would execute successfully and the ORD_NO column would have the
value 20 for the CUST_ID 101 because the default CACHE value is 20.
Which two statements are true about constraints?
Posted by seenagape on October 7, 2015 No comments
Which two statements are true about constraints? (Choose two.)
A.
The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
B.
The NOT NULL constraint ensures that null values are not permitted for the column.
C.
A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
D.
The UNIQUE constraint does not permit a null value for the column.
RealTime WPF Charts
Plot many millions of datapoints! 30 Day Free Trial Available Online.
Which two statements regarding the EMP_ID_SEQ sequence are
true?
Posted by seenagape on October 7, 2015 No comments
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL,
Primary Key EMP_NAME VARCHAR2(30) JOB_ID NUMBER\ SAL NUMBER MGR_ID
NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to
DEPARTMENT_ID column of theDEPARTMENTS table You created a sequence called
EMP_ID_SEQ in order to populate sequential values for the EMPLOYEE_ID column of the
EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true?
(Choose two.)
A.
The EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID
column.
B.
The EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.
C.
Any other column of NUMBER data type in your schema can use the EMP_ID_SEQ
sequence.
D.
The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES
table.
E.
The EMP_ID_SEQ sequence is dropped automatically when you drop the
EMPLOYEE_ID column.
F.
You cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.
Which two statements describe the consequence of issuing the
ROLLBACK TO SAVE POINT a command in the session?
Posted by seenagape on October 7, 2015 No comments
The SQL statements executed in a user session as follows: Exhibit: Which two statements
describe the consequence of issuing the ROLLBACK TO SAVE POINT a command in the
session? (Choose two.)
A.
Only the seconds DELETE statement is rolled back
B.
No SQL statements are rolled back
C.
The rollback generates an error
D.
Both the DELETE statements and the UPDATE statement are rolled back
E.
Only the DELETE statements are rolled back
Which statement is true regarding the execution of the above query?
Posted by seenagape on October 7, 2015 No comments
You work as a database administrator at ABC.com. You study the exhibit carefully. Exhibit:
You issue the following SQL statement: Which statement is true regarding the execution of
the above query?
A.
It displays a bonus of 1000 for all customers whose AMT_SPENT is less than
CREDIT_LIMIT.
B.
It displays a bonus of 1000 for all customers whose AMT_SPENT equals
CREDIT_LIMIT, or AMT_SPENT is null.
C.
It produces an error because the TO_NUMBER function must be used to convert the
result of the NULLIF function before it can be used by the NVL2 function.
D.
It produces an error because the AMT_SPENT column contains a null value.
Which INSERT statement should be used to add a row into the
ORDERS table for the customer whose CUST_LAST_NAME is
Roberts and CREDIT_LIMIT is 600?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of ORDERS and CUSTOMERS tables. There is
only one customer with the CUST_LAST_NAME column having value Roberts. Which
INSERT statement should be used to add a row into the ORDERS table for the customer
whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600?
A.
INSERT INTO orders (order_id,order_date,order_mode, (SELECT customer_id FROM
customers WHERE cust_last_name=’Roberts’ AND credit_limit=600),order_total)
VALUES(1,’10mar2007′, ‘direct’, &customer_id, 1000);
B.
INSERT INTO orders VALUES (1,’10mar2007′, ‘direct’, (SELECT customer_id FROM
customers WHERE cust_last_name=’Roberts’ AND credit_limit=600), 1000);
C.
INSERT INTO orders (order_id,order_date,order_mode, (SELECT customer_id FROM
customers WHERE cust_last_name=’Roberts’ AND credit_limit=600),order_total)
VALUES(1,’10mar2007′, ‘direct’, &&customer_id, 1000);
D.
INSERT INTO(SELECT o.order_id, o.order_date,o.order_mode,c.customer_id,
o.order_total FROM orders o, customers c WHERE o.customer_id = c.customer_id AND
c.cust_last_name=’Roberts’ ANDc.credit_limit=600 ) VALUES (1,’10mar2007′,
‘direct’,(SELECT customer_id FROM customers WHERE cust_last_name=’Roberts’ AND
credit_limit=600), 1000);
Which SQL statement can Mary use to accomplish that task?
Posted by seenagape on October 7, 2015 No comments
User Mary has a view called EMP_DEPT_LOC_VU that was created based on the
EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a
public synonym, and would like to create a synonym for this view that can be used by all
users of the database. Which SQL statement can Mary use to accomplish that task?
A.
CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu FOR ALL USERS;
B.
CREATE SYNONYM EDL_VU FOR EACH USER ON emp_dept_loc_vu;
C.
CREATE SYNONYM EDL_VU ON emp_dept_loc_vu FOR EACH USER;
D.
CREATE PUBLIC SYNONYM EDL_VU FOR emp_dept_loc_vu;
E.
CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu;
F.
CREATE PUBLIC SYNONYM EDL:VU FOR mary (emp_dept_loc_vu);
Which query would accomplish this task?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the CUSTOMERS table. You have been
asked to produce a report on the CUSTOMERS table showing the customers details sorted
in descending order of the city and in the descending order of their income level in each city.
Which query would accomplish this task?
A.
SELECT cust_city, cust_income_level, cust_last_name FROM customers ORDER BY
cust_city desc, cust_income_level DESC;
B.
SELECT cust_city, cust_income_level, cust_last_name FROM customers ORDER BY
cust_income_level desc, cust_city DESC;
C.
SELECT cust_city, cust_income_level, cust_last_name FROM customers ORDER BY
(cust_city, cust_income_level) DESC;
D.
SELECT cust_city, cust_income_level, cust_last_name FROM customers ORDER BY
cust_city, cust_income_level DESC;
Which statement is true regarding the above query?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PROMOTIONS, SALES, and
CUSTOMER tables. You need to generate a report showing the promo name along with the
customer name for all products that were sold during their promo campaign and before 30th
October 2007. You issue the following query: Which statement is true regarding the above
query?
A.
It produces an error because the join order of the tables is incorrect.
B.
It produces an error because equijoin and nonequijoin conditions cannot be used in the
same SELECT statement.
C.
It executes successfully and gives the required result.
D.
It executes successfully but does not give the required result.
Which is the valid DELETE statement?
Posted by seenagape on October 7, 2015 1 comment
View the Exhibit and examine the description for the PRODUCTS and SALES table.
PROD_ID is a primary key in the PRODUCTS table and foreign key in the SALES table.
You want to remove all the rows from the PRODUCTS table for which no sale was done for
the last three years. Which is the valid DELETE statement?
A.
DELETE FROM products WHERE prod_id = (SELECT prod_id FROM sales WHERE
SYSDATE >= time_id – 3*365 );
B.
DELETE FROM products WHERE prod_id IN (SELECT prod_id FROM sales WHERE
SYSDATE – 3*365 >= time_id);
C.
DELETE FROM products WHERE prod_id IN (SELECT prod_id FROM sales WHERE
time_id >= SYSDATE – 3*365 );
D.
DELETE FROM products WHERE prod_id = (SELECT prod_id FROM sales WHERE
time_id – 3*365 = SYSDATE );
Explanation:
Which query would give the required output?
Posted by seenagape on October 7, 2015 No comments
You need to display the first names of all customers from the CUSTOMERS table that
contain the character ‘e’ and have the character ‘a’ in the second last position. Which query
would give the required output?
A.
SELECT cust_first_name FROM customers WHERE INSTR(cust_first_name, ‘e’)<>0
AND SUBSTR(cust_first_name, LENGTH(cust_first_name),2)=’a’;
B.
SELECT cust_first_name FROM customers WHERE INSTR(cust_first_name, ‘e’)<>0
AND SUBSTR(cust_first_name, 2, 1)=’a’;
C.
SELECT cust_first_name FROM customers WHERE INSTR(cust_first_name, ‘e’)<>”
AND SUBSTR(cust_first_name, 2, 1)=’a’;
D.
SELECT cust_first_name FROM customers WHERE INSTR(cust_first_name, ‘e’)IS NOT
NULL AND SUBSTR(cust_first_name, 1,2)=’a’;
What would be the outcome of the above statement?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the CUSTOMERS table. Evaluate the query
statement:What would be the outcome of the above statement?
A.
It produces an error because the AND operator cannot be used to combine multiple
BETWEEN clauses.
B.
It executes successfully only if the CUST_CREDIT_LIMIT column does not contain any
null values.
C.
It executes successfully.
D.
It produces an error because the condition on CUST_LAST_NAME is invalid.
RealTime WPF Charts
Plot many millions of datapoints! Free Trial
Which query would give the required result?
Posted by seenagape on October 7, 2015 No comments
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, DISTINCT cust_credit_limit * 0.50 AS “50% Credit Limit”
FROM customers;
B.
SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS “50%
Credit Limit” FROM customers;
C.
SELECT DISTINCT cust_income_level ‘ ‘ cust_credit_limit * 0.50 AS “50% Credit Limit”
FROM customers;
D.
SELECT cust_income_level ‘ ‘ cust_credit_limit * 0.50 AS “50% Credit Limit” FROM
customers;
Which SQL statements are valid?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PROMOTIONS table. Which SQL
statements are valid? (Choose all that apply.)
A.
SELECT promo_id. DECODE(NULLIF(promo_cost. 10000). NULL. promo_cost*.25,
*N/A’) “Catcost” FROM promotions;
B.
SELECT promo id. DECODE(promo_cost. 10000. DECODE(promo_category. ‘Gl\
promo_cost * 25. NULL). NULL) “Catcost” FROM promotions;
C.
SELECT promo_id. DECODE(NVL(promo_cost.O).promo_cost * 0.25. 100) “Discount”
FROM promotions;
D.
SELECT promo_id. DECODE(promo_cost. >10000. ‘High’. <10000. ‘Low’)
“Range”FROM promotions;
Which statement is true regarding the above query if one of the values
generated by the sub query is NULL?
Posted by seenagape on October 7, 2015 2 comments
Evaluate the following SQL statement: SQL> SELECT cust_id. cust_last_name FROM
customers WHERE cust_credit_limit IN (select cust_credit_limit FROM customers WHERE
cust_city=’Singapore’): Which statement is true regarding the above query if one of the
values generated by the sub query is NULL?
A.
It produces an error.
B.
It executes but returns no rows.
C.
It generates output for NULL as well as the other values produced by the sub query.
D.
It ignores the NULL value and generates output for the other values produced by the sub
query.
Which two queries would give the required output?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PRODUCTS table. You need to generate
a report in the following format: CATEGORIES 5MP Digital Photo Camera’s category is
Photo Y Box’s category is Electronics Envoy Ambassador’s category is Hardware Which
two queries would give the required output? (Choose two.)
A.
SELECT prod_name || q'<‘s >’ || ‘category is ‘ || prod_category CATEGORIES FROM
products;
B.
SELECT prod_name || q”’s category is ‘ || prod_category CATEGORIES FROM products;
C.
SELECT prod_name || q'[‘s ]’category is ‘ || prod_category CATEGORIES FROM
products;
D.
SELECT prod_name || q’\’s\’ || ‘ category is ‘ || prod_category CATEGORIES FROM
products;
Which statement is true regarding the outcome of the above query?
Posted by seenagape on October 7, 2015 No comments
The PART_CODE column in the SPARES table contains the following list of values: Which
statement is true regarding the outcome of the above query?
A.
It displays only the values A%BWQ123 and AB_WQ123.
B.
It displays only the values A%_WQ123 and A%BWQ123 .
C.
It displays only the values A%_WQ123 and AB_WQ123 .
D.
It produces an error.
E.
It displays all values.
Which clause in the above SQL statement causes the error?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PROMOTIONS table. Evaluate the
following SQL statement: The above query generates an error on execution. Which clause
in the above SQL statement causes the error?
A.
WHERE
B.
SELECT
C.
GROUP BY
D.
ORDER BY
Which statement is true regarding sub queries?
Posted by seenagape on October 7, 2015 No comments
Which statement is true regarding sub queries?
A.
The NOT IN operator is equivalent to IS NULL with single row subqueries.
B.
=ANY and =ALL operators have the same functionality in multiple row subqueries.
C.
The LIKE operator cannot be used with single row subqueries.
D.
The NOT operator can be used with IN, ANY, and ALL operators in multiplerowsubqueries.
Which two queries give the required result?
Posted by seenagape on October 7, 2015 No comments
View the Exhibits and examine the structures of the PRODUCTS SALES and CUSTOMERS
tables.You need to generate a report that gives details of the customer’s last name, name of
the product, and the quantity sold for all customers in Tokyo’. Which two queries give the
required result? (Choose two.)
A.
SELECT c.cust_last_name,p.prod_name, s.quantity_sold FROM sales s JOIN products p
USING(prod_id) JOIN customers c USING(cust_id) WHERE c.cust_city=’Tokyo’;
B.
SELECT c.cust_last_name, p.prod_name, s.quantity_sold FROM products p JOIN sales
s JOIN customers c ON(p.prod_id=s.prod_id) ON(s.cust_id=c.cust_id) WHERE
c.cust_city=’Tokyo’;
C.
SELECT c.cust_last_name, p.prod_name, s.quantity_sold FROM products p JOIN sales
s ON(p.prod_id=s.prod_id) JOIN customers c ON(s.cust_id=c.cust_id) AND
c.cust_city=’Tokyo’;
D.
SELECT c.cust_id,c.cust_last_name,p.prod_id, p.prod_name, s.quantity_sold FROM
products p JOIN saless USING(prod_id) JOIN customers c USING(cust_id) WHERE
c.cust_city=’Tokyo’;
Which statement would display the highest credit limit available in
each income level in each city in the CUSTOMERS table?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the CUSTOMERS table .Which statement
would display the highest credit limit available in each income level in each city in the
CUSTOMERS table?
A.
SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customers GROUP
BY cust_city, cust_income_level, MAX(cust_credit_limit);
B.
SELECT cust_city, cust_income_level, MAX(cust_credit_limit ) FROM customers
GROUP BY cust_city, cust_income_level, cust_credit_limit;
C.
SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customers GROUP
BY cust_city, cust_income_level;
D.
SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customers GROUP
BY cust_credit_limit, cust_income_level, cust_city ;
Explanation:
Which ORDER BY clause are valid for the above query?
Posted by seenagape on October 7, 2015 No comments
Evaluate the following SQL statement: SQL> SELECT cust_id, cust_last_name “Last
Name” FROM customers WHERE country_id = 10 UNION SELECT cust_id CUST_NO,
cust_last_name FROM customers WHERE country_id = 30; Which ORDER BY clause are
valid for the above query? (Choose all that apply.)
A.
ORDER BY “Last Name”
B.
ORDER BY “CUST_NO”
C.
ORDER BY 2,cust_id
D.
ORDER BY 2,1
E.
ORDER BY CUST_NO
Which is the valid CREATE [TABLE statement?
Posted by seenagape on October 7, 2015 3 comments
Which is the valid CREATE [TABLE statement?
A.
CREATE TABLE emp9$# (emp_no NUMBER(4));
B.
CREATE TABLE 9emp$# (emp_no NUMBER(4));
C.
CREATE TABLE emp*123 (emp_no NUMBER(4));
D.
CREATE TABLE emp9$# (emp_no NUMBER(4). date DATE);
Explanation:
Which views can have all DML operations performed on it?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit to examine the description for the SALES table. Which views can have all
DML operations performed on it? (Choose all that apply.)
A.
CREATE VIEW v2 AS SELECT prod_id, cust_id, time_id FROM SALES WHERE time_id
<= SYSDATE – 2*365 WITH CHECK OPTION;
B.
CREATE VIEW v1 AS SELECT * FROM SALES WHERE time_id <= SYSDATE – 2*365
WITH CHECK OPTION;
C.
CREATE VIEW v3 AS SELECT * FROM SALES WHERE cust_id = 2034 WITH CHECK
OPTION;
D.
CREATE VIEW v4 AS SELECT prod_id, cust_id, SUM(quantity_sold) FROM SALES
WHERE time_id <= SYSDATE – 2*365 GROUP BY prod_id, cust_id WITH CHECK
OPTION;
Explanation:
Which INSERT statement should be used to add a row into the
ORDERS table for the customer whose CUST_LAST_NAME is
Roberts and CREDIT_LIMIT is 600?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of ORDERS and CUSTOMERS tables. There is
only one customer with the cus_last_name column having value Roberts. Which INSERT
statement should be used to add a row into the ORDERS table for the customer whose
CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600?
A.
INSERT INTO orders VALUES (l.’10mar2007\ ‘direct’. (SELECT customerid FROM
customers WHERE cust_last_iiame=’Roberts’ AND credit_limit=600). 1000);
B.
INSERT INTO orders (order_id.order_date.order_mode. (SELECT customer id FROM
customers WHERE cust_last_iiame=’Roberts’ AND redit_limit=600).order_total)
VALUES(L’10mar2007′. ‘direct’, &&customer_id, 1000):
C.
INSERT INTO(SELECT o.order_id. o.order_date.o.order_modex.customer_id.
o.ordertotal FROM orders o. customers c WHERE o.customer_id = c.customerid AND
c.cust_la$t_nameRoberTs’ ANDc.credit_liinit=600) VALUES (L’10mar2007\ ‘direct’.(
SELECT customer_id FROM customers WHERE cust_last_iiame=’Roberts’ AND
credit_limit=600). 1000);
D.
INSERT INTO orders (order_id.order_date.order_mode. (SELECT customer_id FROM
customers WHERE cust_last_iiame=’Roberts’ AND credit_limit=600).order_total)
VALUES(l.’10mar2007\ ‘direct’. &customer_id. 1000):
What is true regarding sub queries?
Posted by seenagape on October 7, 2015 No comments
What is true regarding sub queries?
A.
The inner query returns a value to the outer query
B.
The inner query must always return a value or the outer query will give an error
C.
The outer query must return a value to the outer query
D.
The outer query always sorts the results of the inner query
E.
The inner query always sorts the results of the outer query
Explanation:
Which statement is true regarding the outcome of the above query?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the CUSTOMERS table. Evaluate the
following SQL statement: Which statement is true regarding the outcome of the above
query?
A.
It returns an error because the BETWEEN operator cannot be used in the HAVING
clause.
B.
It returns an error because WHERE and HAVING clauses cannot be used in the same
SELECT statement.
C.
It returns an error because WHERE and HAVING clauses cannot be used to apply
conditions on the same column.
D.
It executes successfully.
What would be the outcome?
Posted by seenagape on October 7, 2015 No comments
The following data exists in the PRODUCTS table: PROD_ID PROD_LIST_PRICE
——————————————— 123456 152525.99 You issue the following query: SQL>
SELECT RPAD(( ROUND(prod_list_price)), 10,’*’) FROM products WHERE prod_id =
123456; What would be the outcome?
A.
152526****
B.
**152525.99
C.
152525**
D.
an error message
Which statement is true regarding the above two SQL statements?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PROMOTIONS table. Examine the
following two SQL statements: Which statement is true regarding the above two SQL
statements?
A.
statement 1 gives an error, statement 2 executes successfully
B.
statement 1 and statement 2 execute successfully and give a different output
C.
statement 2 gives an error, statement 1 executes successfully
D.
statement 1 and statement 2 execute successfully and give the same output
Explanation:
Examine the structure and data of the CUSTJTRANS table:
CUSTJRANS Name Null?
Posted by seenagape on October 7, 2015 No comments
Examine the structure and data of the CUSTJTRANS table: CUSTJRANS Name Null? Type
CUSTNO NOT NULL CHAR(2) TRANSDATE DATE TRANSAMT NUMBER(6.2) CUSTNO
TRANSDATE TRANSAMT 11 01JAN07 1000 22 01FEB07 2000 33 01MAR07 3000
Dates are stored in the default date format ddmonrr in the CUSTJTRANS table. Which
three SQL statements would execute successfully? (Choose three.)
A.
SELECT transdate + ’10’ FROM custjrans;
B.
SELECT * FROM custjrans WHERE transdate = ’010107′:
C.
SELECT transamt FROM custjrans WHERE custno > ’11’:
D.
SELECT * FROM custjrans WHERE transdate=’01JANUARY07′:
E.
SELECT custno – ‘A’ FROM custjrans WHERE transamt > 2000:
Which statement is true regarding the above query?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the data in the COSTS table. You need to generate a report
that displays the IDs of all products in the COSTS table whose unit price is at least 25%
more than the unit cost. The details should be displayed in the descending order of 25% of
the unit cost. You issue the following query: Which statement is true regarding the above
query?
A.
It produces an error because the expression in the ORDER BY clause should also be
specified in the SELECT clause.
B.
It executes and produces the required result.
C.
It produces an error because an expression cannot be used in the ORDER BY clause.
D.
It produces an error because the DESC option cannot be used with an expression in the
ORDER BY clause.
Which two statements are true regarding sub queries?
Posted by seenagape on October 7, 2015 No comments
Which two statements are true regarding sub queries? (Choose two.)
A.
There is no limit on the number of sub query levels in the WHERE clause of a SELECT
statement.
B.
A sub query can appeal* on either side of a comparison operator.
C.
A sub query can be used only in SQL query statements.
D.
A sub query can retrieve zero or more rows.
E.
Only two sub queries can be placed at one level
Which statement is true regarding the above query?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the data in the PRODUCTS table. You need to display
product names from the PRODUCTS table that belong to the ‘Software/Other1 category
with minimum prices as either $2000 or $4000 and no unit of measure. You issue thej
following query: Which statement is true regarding the above query?
A.
It executes successfully but returns no result.
B.
It executes successfully and returns the required result.
C.
It generates an error because the condition specified for PROD_UNIT_OF_MEASURE is
not valid.
D.
It generates an error because the condition specified for the PROD_CATEGORY column
is not valid.
Which two SQL statements would give the required output?
Posted by seenagape on October 7, 2015 1 comment
You need to calculate the number of days from 1st January 2007 till date . Dates are stored
in the default format of ddmonrr. Which two SQL statements would give the required
output? (Choose two.)
A.
SELECT SYSDATE – ’01JAN2007′ FROM DUAL:
B.
SELECT TO_DATE(SYSDATE. *DD/MONTH/YYYY’) – ’01/JANUARY/2007′ FROM
DUAL:
C.
SELECT TO_CHAR(SYSDATE. ‘DDMONYYYY’) – ’01JAN2007′ FROM DUAL:
D.
SELECT SYSDATE – TOJDATE(X)1/JANUARY/2007″) FROM DUAL:
E.
SELECT SYSDATE – TOJDATE(’01JANUARY2007′) FROM DUAL;
Winch two queries would achieve the required result?
Posted by seenagape on October 7, 2015 No comments
You need to generate a list of all customer last names with their credit limits from the
CUSTOMERS table. Those customers who do not have a credit limit should appear last in
the list. Winch two queries would achieve the required result? (Choose two.)
A.
SELECT cust_last_name. cust_credit_limit FROM customers ORDER BY
cust_credit_limit DESC:
B.
SELECT cust_last_name. cust_credit_limit FROM customers ORDER BY
cust_credit_limit:
C.
SELECT cust_last_name. cust_credit_limit FROM customers ORDER BY
cust_credit_limit NULLS LAST:
D.
SELECT cust_last_name. cust_credit_limit FROM customers ORDER BY
cust_last_name. cust_credit_limit NULLS LAST:
Explanation:
Examine the structure and data in the PRIC E_LIST table: Name
Null?
Posted by seenagape on October 7, 2015 1 comment
Examine the structure and data in the PRIC E_LIST table: Name Null? Type ————
———— —————— PROD_D NOT NULL NUMBER(3) PROD_PRICE VARCHAR2(10)
PROD_ID PROD PRICE ———– ———————— 100 $234.55 101 $6,509.75 102
$1,234 in the same format as the PROD_PRICE. Which SQL statement would give the
required result?
A.
SELECT TO_NUMBER(TO_NUMBER(prod_price.,$99.999.99′)* .25/$99.999.00′) FROM
PRICE_LIST:
B.
SELECT TO_CHAR(prod_price* .25.’$99.999.99′) FROM PRICEJLIST:
C.
SELECT TO_CHAR(TO_NUMBER(prod_price)* .25.’$99.999.00′) FROM PRICE_LIST;
D.
SELECT TO_CRAR(TO_NUMBER(prod_price.’S99.999.99′)* .25.’$99.999.00′) FROM
PRICE_LIST:
Which statement is true regarding the outcome?
Posted by seenagape on October 7, 2015 No comments
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: Which statement is true
regarding the outcome?
A.
Both statements 1 and 2 execute successfully and give the same required result.
B.
Both statements 1 and 2 execute successfully and give different results.
C.
Only statement 1 executes successfully and gives the required result.
D.
Only statement 2 executes successfully and gives the required result.
Which statement is true regarding the COALESCE function?
Posted by seenagape on October 7, 2015 No comments
Which statement is true regarding the COALESCE function?
A.
It requires that at least one of the expressions in the list must have a NOT NULL value.
B.
It can have a maximum of five expressions in a list.
C.
It returns the highest NOT NULL value in the list for all rows.
D.
It requires that all expressions in the list must be of the same data type.
Which two CREATE INDEX statements are valid?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of ORD and ORD_ITEMS tables. The ORD_NO
column is PRIMARY KEY in the ORD table and the ORD_NO and ITEM_NO columns are
composite PRIMARY KEY in the ORD_ITEMS table. Which two CREATE INDEX
statements are valid? (Choose two.)
A.
CREATE INDEX ord_idx4 ON ord,ord_items(ord_no, ord_date,qty);
B.
CREATE INDEX ord_idx3 ON ord_items(item_no);
C.
CREATE INDEX ord_idx2 ON ord_items(ord_no);
D.
CREATE INDEX ord_idx1 ON ord(ord_no);
Which two queries would give the required result?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PROMOTIONS table. Using the
PROMOTIONS table, you need to find out the names and cost of all the promos done on
‘TV’ and ‘internet’ that ended in the time interval 15th March ’00 to 15th October ’00. Which
two queries would give the required result? (Choose two.)
A.
SELECT promo_name, promo_cost FROM promotions WHERE promo_category IN
(‘TV’, ‘internet’) AND promo_end_date BETWEEN ’15MAR00′ AND ’15OCT00′;
B.
SELECT promo_name, promo_cost FROM promotions WHERE promo_category = ‘TV’
OR promo_category =’internet’ AND promo_end_date >=’15 MAR00′ ORpromo_end_date
<=’15OCT00′;
C.
SELECT promo_name, promo_cost FROM promotions WHERE (promo_category
BETWEEN ‘TV’ AND ‘internet’) AND (promo_end_date IN (’15MAR00′,’15OCT00′));
D.
SELECT promo_name, promo_cost FROM promotions WHERE (promo_category = ‘TV’
OR promo_category =’internet’) AND (promo_end_date >=’15 MAR00’AND
promo_end_date <=’15OCT00′);
Explanation:
Which SQL statement would give the required result?
Posted by seenagape on October 7, 2015 No comments
You need to display the date lloct2007 in words as “Eleventh of October, Two Thousand
Seven’. Which SQL statement would give the required result?
A.
SELECT TO_CHAR(TO_DATE(‘lloct2007’), ‘miDdthsp “of* Month. Year’) FROM DUAL;
B.
SELECT TO_DATE(TO_CHAR(‘lloct20077fiiiDdspth “of” Month. Year’)) FROM DUAL:
C.
SELECT TO_CHAR(TO_DATE(‘lloct2007’X ‘miDdspth of month, year’) FROM DUAL;
D.
SELECT TO_CHAR(‘lloct2007’. ‘miDdspth “of Month. Year’) FROM DUAL:
What would be the outcome if all the parentheses are removed from
the above statement?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PRODUCTS table. All products have a list
price. You issue the following command to display the total price of each product after a
discount of 25% and a tax of 15% are applied on it. Freight charges of S100 have to be
applied to all the products. What would be the outcome if all the parentheses are removed
from the above statement?
A.
The result remains unchanged.
B.
The total price value would be lower than the correct value.
C.
The total price value would be higher than the correct value.
D.
It produces a syntax error.
Which set of SQL statements achieves the desired results?
Posted by seenagape on October 7, 2015 1 comment
You need to perform these tasks: Create and assign a MANAGER role to Blake and Clark
Grant CREATE TABLE and CREATE VIEW privileges to Blake and Clark Which set of SQL
statements achieves the desired results?
A.
CREATE ROLE manager; GRANT create table, create view TO manager; GRANT
manager TO BLAKE,CLARK;
B.
CREATE ROLE manager; GRANT create table, create voew TO manager; GRANT
manager ROLE TO BLAKE,CLARK;
C.
GRANT manager ROLE TO BLAKE,CLARK; GRANT create table, create voew TO
BLAKE CLARK; ***MISSING***
What would be the outcome of the above query?
Posted by seenagape on October 7, 2015 No comments
Evaluate the following query: What would be the outcome of the above query?
A.
It produces an error because the data types are not matching.
B.
It executes successfully and introduces an ‘s at the end of each promo_name in the
output.
C.
It produces an error because flower braces have been used.
D.
It executes successfully and displays the literal” {‘s start date was} ” for each row in
theoutput.
Which query would give the required result?
Posted by seenagape on October 7, 2015 No comments
View the Exhibit and examine the structure of the PROMOTIONS table. Using the
PROMOTIONS table, you need to display the names of all promos done after January 1,
2001, starting with the latest promo. Which query would give the required result? (Choose
all that apply.)
A.
SELECT promo_name, promo_begin_date FROM promotions WHERE
promo_begiii_date > ’01JAN01′ ORDER BY 2 DESC;
B.
SELECT promo_name. promo_begiii_date FROM promotions WHERE
promo_begin_date > ’01JAN01′ ORDER BY promo_name DESC:
C.
SELECT promo_name. promo_begin_date FROM promotions WHERE
promo_begin_date > ’01JAN01′ ORDER BY 1DESC:
D.
SELECT promo_name, promo_begin_date “START DATE” FROM promotions WHERE
promo_begin_date > ’01JAN01′ ORDER BY “START DATE” DESC;
Explanation:
Identify the reason for the SQL statement failure?
Posted by seenagape on October 7, 2015 No comments
Evaluate the following SQL commands: The command to create a table fails. Identify the
reason for the SQL statement failure? (Choose all that apply.)
A.
You cannot use ORD_NO and ITEM_NO columns as a composite primary key because
ORD NO is also the FOREIGN KEY.
B.
You cannot use SYSDATE in the condition of a CHECK constraint.
C.
You cannot use the BETWEEN clause in the condition of a CHECK constraint.
D.
You cannot use the NEXTVAL sequence value as a DEFAULT value for a column.
Explanation:
Which arithmetic operations can be performed on a column by using
a SQL function that is built into Oracle database?
Posted by seenagape on October 7, 2015 No comments
Which arithmetic operations can be performed on a column by using a SQL function that is
built into Oracle database? (Choose three.)
A.
finding the lowest value
B.
finding the quotient
C.
raising to a power
D.
addition
E.
subtraction
Which WHERE clause would give the required result?
Posted by seenagape on October 7, 2015 1 comment
View the Exhibit and examine the structure of the PROMOTIONS table. You need to
generate a report of all promos from the PROMOTIONS table based on the following
conditions: 1. The promo name should not begin with ‘T’ or ‘N’. 2. The promo should cost
more than $20000. 3. The promo should have ended after 1st January 2001. Which
WHERE clause would give the required result?
A.
WHERE promo_name NOT LIKE ‘T%’ OR promo_name NOT LIKE ‘N%’ AND
promo_cost > 20000 AND promo_end_date > ‘1JAN01’
B.
WHERE (promo_name NOT LIKE ‘T%’ AND promo_name NOT LIKE ‘N%’)OR
promo_cost > 20000 OR promo_end_date > ‘1JAN01’
C.
WHERE promo_name NOT LIKE ‘T%’ AND promo_name NOT LIKE ‘N%’ AND
promo_cost > 20000 AND promo_end_date > ‘1JAN01’
D.
WHERE (promo_name NOT LIKE ‘%T%’ OR promo_name NOT LIKE ‘%N%’)
AND(promo_cost > 20000 AND promo_end_date > ‘1JAN01’)
Page 3 of 5«12345»
Questions & Answer collection