【Oracle学习】OCP-071 练习题下

【Oracle学习】 OCP-071 练习题下_Q201-Q242

Q201. Examine the description of the PRODCTS table which contains data: Name Null? Type ----------------------------------------------
NUMBER (2) VARCHAR2 (20)
DATE
A) The PROD ID column can be renamed.
B) The PROD_ ID column data type can be changed to VARCHAR2 (2). C) The EXPIRY DATE column data type can be changed to TIME STAMP.
PROD ID
PROD NAME EXPIRYDATE
Which two are true?
NOT NULL NOT NULL

D)The EXPIRY DATE column cannot be dropped.
E) The PROD NAME column cannot have a DEFAULT clause added to it. Answer: AC
Q202. Which three items does a direction of a relationship contain? A) an attribute
B) a cardinality
C) label
D) an optionality
E) a unique identifier F) an entity
Answer: ABF
Q203.
Examine this query which executes successfully: SELECT job, deptno FROM emp
UNION ALL
SELECT job, deptno FROM jobs_ history;
What will be the result?
A) It will return rows common to both SELECT statements.
B) It will return rows from both SELECT statements after eliminating duplicate rows.
C) It will return rows that are not common to both SELECT statements.
D)It will return rows from both SELECT statements including duplicate rows. Answer: B
Q204.Which two statements are true about * TABLES views?
A) You must have SELECT privileges on a table to view it in ALL TABLES. B) You must have SELECT privileges on a table to view it in DBA TABLES. C) USER TABLES displays all tables owned by the current user.
D) All TABLES displays all tables owned by the current user.
E) You must have SELECT privileges on a table to view it in USER TABLES. F) All users can query DBA TABLES successfully.
Answer: AC

Q205. Which two statements cause changes to the data dictionary? A) DELETE FROM scott. emp;
B) GRANT UPDATE ON scott. emp TO fin manager;
C) AITER SESSION set NLs. DATE FORMAT = 'DD/MM/YYYY';
D) TRUNCATE TABLE emp:
E) SELECT * FROM user
tab._ privs; Answer: BD
Q206. Which two statements execute successfully?
A) SELECT TO_ DATE('2019-DEC-25 15:30', 'YYYY-MON-DD HH24:MI', 'NLS_ DATE_ LANGUAGE =AMERICAN' ) FROM DUAL;
B) SELECT TO_CHAR('2019-DEC-25 15:30" , YY-MON-D HH24:M2', 'NLS_DATE LANGUAGE = AMERICAN')
FROM DUAL;
C) SELECT TO DATE (TO CHAR (‘2019-DEC-25 03:30’, ‘YYYY-MON-DD HH12:MI’)) FROM DUAL;
D) SELECT TO _ CHAR (TO_ DATE (‘2019-DEC-25 03:30’,’YYYY-MON-DD HH12:MI’)) FROM DUAL
E) SELECT TO _ CHAR (‘2019-DEC-25 15:30’.’YYYY-MON-DD HH24:MI’) FROM DUAL
Answer: AC
Q207. 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 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: BD
Q208. 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: D
Q209. Which two queries execute successfully?
A) SELECT INTERVAL '1' DAY - SYSDATE FROM DUAL;
B) SELECT SYSTIMESTAMP + INTERVAL '1' DAY FROM DUAL;
C) SELECT INTERVAL '1' DAY - INTERVAL '1' MINUTE FROM DUAL; D) select INTERVAL '1' DAY +INTERVAL '1' MONTH FROM DUAL; E) SELECT SYSDATE “INTERRVAL '1' DAY FROM DUAL;
Answer: BC
Q210. Examine this statement which executes successfully: CREATE view emp80 AS
SELECT

FROM employees
WHERE department_ id = 80 WITH CHECK OPTION;
Which statement will violate the CHECK constraint? A) DELETE FROM emp80
WHERE department_ id = 90;
B) SELECT
FROM emp80
WHERE department_ id = 90;
C) SELECT
FROM emp80
WHERE department. id = 80;
D) UPDATE emp80
SET department. 1d =80; WHERE department_ id =90; Answer:D
Q210. Examine the desciption of the ENPLYEES table: Name Null? Type ----------------------------------------------
EMPLOYEE_ID EMPLOYEE_ NAME SALARY DEPARTMENT_ ID
NOT NULL NOT NULL
NOT NULL NOT NULL
NUMBER (6) VARCHAR2 (20)
NUMBER NUMBER (4 )
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);
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: CD
Q211. Examine thee statements which execute successfully: CREATE USER finance IDENTIFIED BY pwfin;
CREATE USER fin manager IDENTIETED BY pwmgr;
CREATE USER fin. Clerk IDENTIFIED BY pwclerk;
GRANT CREATE SESSON 20 finance, fin clerk;
GRANT SELECT ON scott. Emp To finance WITH GRANT OPTION; CONNECT finance/pwfin
GRANT SELECT ON scott. emp To fin_ clerk;
Which two are true?
A) Dropping user FINANCE will automatically revoke SELECT on SCOTT. EMP from user FIN _ CLERK
B) Revoking SELECT on SCOTT. EMP from user FINANCE will also revoke the privilege from user
FIN
CLERK.
C) User FINANCE can grant CREATE SESSION to user FIN MANAGER.
D) User FIN CLERK can grant SELECT on SCORT, ENP to user FIN MANAGER.
E) User FINANCE is unable to grant ALL on SCOTT.ENP to FIN MANAGER. Answer: BD

Q212. Examine the ORDER ITEms table:
Name
ORDER
ID
PRODUCT_ ID
QUANTITY
Which two queries return rows where QUANTITY is a multiple of ten?
A) SELECT * FROM order_ items WHERE quantity = TRUNC (quantity, -1);
B) SELECT * FROM order_ items WHERE MOD (quantity, 10) = 0;
C) SELECT” FROM order_ items WHERE FLOOR (quantity / 10) = TRUNC (quantity / 10); D) SELECT FROM order_ items WHERE quantity / 10 = TRUNC (quantity);
E) SELECT” FROM order_ _items Answer: BC
Q213. Examine the BRICKS table:
Null?
NOT NULL
Type NUMBER (38)
NOT NULL NOT NULL
NUMBER (38) NUMBER (38)
WHERE quantity = ROUND (quantity, 1);
WE IGHT ----------
5 10 15
20
How many rows will the query return? A) 1
B) 16
C) 10
D) 6
E) 4
F) 0 Answer: D
Q214. Examine the description of the CUSTOMERS table:
COLOUR -------- Red
Red
SHAPE ---------
cube cylinder
Blue
Blue
You write this query:
SELECT
FROM bricks b1 CROSS JOIN bricks b2 WHERE b1. Weight < b2. Weight:
cube cylinder

Name
CUSTOMER ID
CUSTOMER_ NAME
INSERT DATE
Which three statements will do an implicit conversion?
A) SELECT * FROM customers WHERE TO_ CHAR (customer_ id) = '0001'; B) SELECT * FROM customers WHERE customer id = '0001';
C)SELECT * FROM customers WHERE customer_ id = 0001;
D) SELECT FROM customers WHERE insert date = '01-JAN-19';
E) SELECT. FROM customers WHERE insert_ date = DATE *2019-01-01';
F)SELECT. FRON customers WE TO DATE (Insert _ date) = DATE ‘2019-01-01’; Answer: ABF
EMPLOYEE_ID LAUT NANE
101 Kochhar
102 Ernst
103 Rajs
104 LORENTZ
105 Morris
Which statement will compute the total
A) SELECT last _ NAME (monthly_ salary FROM employees;
Null?
NOT NULL
Type NUMBER (38)
Q215. Examine the data in the EMPLOYEES table:
NOT NULL NOT NULL
VARCHAR2 (100) DATE
MONTHLY SALARY 24000
MONTTHLY COMEHISSIOM PCT
.5
.2
17000
21000
25000
12000
annual compensation for each employee?

  • monthly commission _ pct) * 12 AS annual comp
    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

Q216. Examine the description of the ORDERS table:
Name


ORDER_ ID
ORDER_ DATE
Examine the description of the INVOICES table:
Name


INVOICE_ ID
INVOICE_DATE
Which three statements execute successfully?
A) (SELECT * FROM orders
UNION ALL
SELECT* FROM invoices) ORDER BY order _id;
Null? Type


-------------- NUMBER (38) DATE
----------- NUMBER (38)
DATE
Null? Type


B) SELECE order id, order _ date FRON orders LNTERSECT
SELECT invoice
id, invoice_ id, order_ date FROM orders
C) SELECT order_ id, invoice_ data order_ date FROM orders MINUS
SELECT invoice_ id, invoice_ data FROM invoices ORDER BY invoice_ id;
D) SELECT * FROM orders ORDER BY order_ id INTERSEOT
SELECT * FROM invoices ORDER BY invoice_ id;
E) SELECT order_ id, order_ data FROM orders
UNION ALL
SELECT invoice_ id, invoice_ data FROM invoices ORDER BY order_ id;
F) SELECT * FROM orders MINUS
SELECT * FROM INVOICES ORDER BY 1
G) SELECT * FROM orders ORDER BY order_ id UNION
SELECT * FROM invoices; Answer: AEF
Q217. Which three queries execute successfully?
A) SELECT (SYSDATE-DATE '2019-01-01') / 1 FROM DUAL;

B) SELECT 1 / SYSDATE - DATE '2019-01-01' FROM DUAL;
C) SELECT SYSDATE / DATE '2019-01-01' - 1 FROM DUAL
D) SELECT SYSDATE - DATE '2019-01-01' - 1 FROM DUAL;
E) SELECT 1 – SYSDATE- DATE '2019-01-01' FROM DUAL;
F) SELECT SYSDATE - 1 - DATE'2019-01-01' EROM DUAL; Answer: ADF
Q218. You execute this command: TRUNCATE TABLE depts; Which two are true?
A) It retains the indexes defined on the table. B) It drops any triggers defined on the table.
C) A Flashback TABLE statement can be used to retrieve the deleted data. D) It retains the integrity constraints defined on the table.
E) A ROLLBACK statement can be used to retrieve the deleted data.
F) It always retains the space used by the removed rows
Answer: AD
Q219. Examine the data ORDER_ ID


1
in the ORDERS table: ORDER DATE ---------------

01-JAN-2019 01-FEB-2019 01-MAR-2019
2
3
4
5
Examine the data in the INVOICES table:
INVOICE_ ID ------------ 1
ORDER_ ID ------------ 1
ORDER DATE -----------------

2 2
3 3
4 4
5 5
Examine this query:
SELECT order_ id, order_ date FROM orders INTERSECT
SELECT order_ 1d, order_ date FROM invoices; Which two rows will it return?
A) 3
B) 2
C) 1
D) 5 01-MAR-2019 E) 4 01-FEB-2019 F) 3 01-JAN-2019 Answer: BF
Q220. Examine the data in the COLORS table:
01-JAN-2019 01-FEB-2019 01-APR-2019
RGB_ HEX VALUE ---------- FE0000
00FF00
0000FF
Examine the data in the BRICKS table:
COLOR_ RGB HEX_VALUE --------------------------
A) SELECT.
FROM bricks b
RIGHT JOIN colors c
ON b. color rgb hex
value = c. rgb hex_ value;
B) SELECT
EROM colors C
LEFT JOIN bricks 上 USING (rgb _ hex_ value) ;
C) SELECT
BRICK ID -------- 1
2
FF0000 00FF00 FFFFFF
3
Which two queries return all the rows from COLORS?
COLOR NAME ------------ red
green
blue

FROM bricks b
FULL JOIN colors C
ON b. color rgb _ hex_ value = c. rgb hex value;
D) SELECT *
EROM bricks | b
JOIN colors C
ON b. color_ rgb_ hex_ value =c. rgb hex value;
E) SELECT
EROM colors C
LEET JOIN bricks b
ON b. color
rgb_ hex value = c. rgb. hex. value
WHERE b. brick_ id > 0;
Answer: AC
Q221. Examine the description of the ENPLOYES table: Name Null? Type ---------------------------------------------
EMP_ ID
EMP_ NAME
DEPT ID
SALARY
JOIN DATE
NLS_ DATE_ FORMAT is set to DD-MON-YY.
Which query requires explicit data type conversion?
A) SELECT SUBSTR(join date, 1, 2) - 10 FROM employees;
B) SELECT join_ date + '20' EROM employees;
C) SELECT join_ date 丨丨‘’丨丨 salary FROM employees;
D) SELECT join _ date FROM employees WHERE join date > *10-02-2018'; E) SELECT salary + '120.50' FROM employees;
Answer: B
Q222. Examine this SQL statement
NOT NULL
NUMBER VARCHAR2 (10)
NUMBER (2) NUMBER (8,2)
DATE

DELETE FROM employees e WHERE EXISTS
(SELECT' dummy'
FROM emp history
WHERE employee_ id= e. employee__ id);
Which two are true?
A) The subquery is not a correlated subquery.
B) The subquery is executed before the DELETE statement is executed.
C) All existing rows in the EMPLOYEES table are deleted,
D) The DELETE statement executes successfully even if the subquery selects multiple rows. E) The subquery is executed for every row in the EMPLOYEES table.
Answer: DE
Q223. Examine the description of the EMPLOYEES table: Name Null? Type --------------------------------------------
EMPLOYEE ID LAST NAME SALARYNOT DEPARTMENT_ ID Examine this query:
NOT NULL NOT NULL
NOT NULL NOT NULL
NUMBER (4) VARCHAR2 (100)
NUMBER (6,2) NUMBER(4)
1
2
3
4
5
6
7
8
Which line produces an error?
A) Line 7 B) Line 8 C) Line 3 D) Line 5 Answer: C
SETECT
e. last_ name,
e. salary,
a. avg_ sal
FROM employees e
WHERE e. salary > (SELECT AVG (a. salary) AS avg _ sal
WHERE ORDER BY e. last
name;
FROM
employees a
a. department_ 1d = e.department. 1d)
Q224.Examine this query which executes successfully; Select job,deptno from emp
Union all
Select job,deptno from jobs_history;
What will be the result?
A. It will return rows from both select statements after eliminating duplicate rows.

B. It will return rows common to both select statements.
C. It will return rows both select statements including duplicate rows.
D. It will return rows that are not common to both select statements.
Answer: B
Q225.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: BC
Q226..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: CE
Q227.
Which three are true aboutprivileges and roles?
A) System prilgese always set prilge for an entire database.
B) PUBLIC acts as a default role granted to every user in a database.
c) A user has all object privileges for every object in their schema by default. D) A role can contain a combination of several privileges and roles.
E) A role is owned by the user who created it.
F) All roles are owned by the sYs schema.
G) PUBIIC can be revoked from a user.
Answer: ACE
.
Q228..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: BD

Q229.You execute these commands:
CREATE TABLE customers (customer id INTEGER, customer name VARCHAR2 (20));
INSERT INTO customers VALUES (1,‘Custmoer1 ‘);
SAVEPOINT post insert;
INSERT INTO customers VALUES (2, ’Customer2 ‘);

SELECTCOUNT (*) FROM customers;
Which two, used independently, can replace so the query retums 1? A) ROLLBACK;
B) COMMIT;
C) ROLIBACK TO SAVEPOINT post_ insert;
D) CONOIT TO SAVEPOINT post_ insert;
E) ROLLEBACK TO post_ insert;
Answer: DE
Q230.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: CE
Q231.Which two are true about unused columns?
A) The DESCRIBE command displays unused columns
B) A primary key column cannot be set to unused.
C) A query can return data from unused columns, but no DML is possible on those columns. D) Once a column has been set to unused, a new column with the same name can be added to the table.
E) A foreign key column cannot be set to unused.
F) Unused columns retain their data until they are dropped
Answer: DF

Q232.Examine the data in the INVOICES table:
INVOICE_ID ----------
CURRENCY_CODE RAISED_DATE --------------- --------------
1 EUR 01-JAN-2019
2 USD 01-FEB-2019
3 JPY 01-MAR-2019
Examine the data in the CURRENCIES table: CURRENCY_CODE


JPY
GPB CAD EUR USD
Which query returns the currencies in CURRENCIES that are not present in INVOICES?
A. SELECT currency_ code FROM currencies MINUS
SELECT currency_ code FROM invoices;
B. SELECT * FROM currencies WHERE NOT EXISTS (
SELECT NULL FROM invoices WHERE currency_ code = currency_ code); C. SELECT currency_ code FROM currencies
INTERSECT
SELECT currency_ code FROM invoices;
D. SELECT * FROM currencies MINUS
SELECT * FROM invoices; Answer: B
Q234.Which query returns the currencies in CURRENCIES that are not present in INVOICES?
A. SELECT currency_ code FROM currencies MINUS
SELECT currency_ code FROM invoices;
B. SELECT * FROM currencies WHERE NOT EXISTS (
SELECT NULL FROM invoices WHERE currency_ code = currency_ code);

C. SELECT currency_ code FROM currencies INTERSECT
SELECT currency_ code FROM invoices;
D. SELECT * FROM currencies MINUS
SELECT * FROM invoices; Answer: B
Q235.Examine the description of the EMPLOYEES table:
Name
------- EMPLOYEE_ NAME HIRE_ DATE SALARY
Null? Type ------------- -------------
NOT NULL VARCHAR2(5) DATE
NUMBER (7,2) The session time zone is the same as the database server
Which two statements will list only the employees who have been working with the company for more than five years?
A. SELECT employee_ name FROM employees WHERE (SYSDATE – hire_ data) / 365>5
B. SELECT employee_ name FROM employees WHERE (SYSTIMESTAMP – hire_ data) / 365>
C. SELECT employee_ name FROM employees WHERE (CUARENT_ DATE – hire_ data / 365>5
D. SELECT employee_ name FROM employees WHERE (SYSNAYW – hire_ data / 12> 3
E. SELECT employee_ name FROM employees WHERE (SYSNAYW – hire_ data / 12> 3
E. SELECT employee_ name FROM employees WHERE (CUNACV_ DATE – hire_ data / 12> 3
Answer: AC
Q236.Examine these statements which execute successfully:
ALTER SESSION SET NLS_DATE_FORMAT = ‘DD-MON-YYYY HH24 MI: SS’

ALTER SESSION SET TIME_ ZONE = ‘-5:00’; SELECT DBTIMEZONE, SYSDATE FROM DUAL Examine the result:
DBTIMEZONE ------------ +00.00
SYSDATE ----------------------- 11-JUL-2019 11:00:00
If LOCALTIMESTAMP was selected at the same time what would it return? A. 11-JUL-2019 6,00,00,00000000 AM – 05:00
B. 11-JUL-2019 11,00,00,00000000 AM
C. 11-JUL-2019 6,00,00,000000 AM
D 11-JUL-2019 11,00,00,000000AM -05:00 Answer: A
Q237.Examine this query:
SELECT SUBSTR (SYSDATE,1,5) ‘Result’ FROM DUAL
Which statement is true?
A. It fails unless the expression is modified to TO-CHAR(SUNBSTR(SYSDATE,1,5)
B. It fails unless the expression is modified to SUBSTR (TO_ CHAR(SYSDATE),1,5)
C. It fails unless the expression is modified to SUBSTR (TO_ CHAR(TRUNC(SYSDATE)),1,5)
D. It executes successfully with an implicit data type conversion Answer: D
Q238.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’ DAY- INTERVAL ‘120’ SECOND, ‘DD-MON-YY’) AS "daTe"
FROM DUAL;
E) SELECT-TO_CHAR(TO DATE(‘29-10-2019’+ INTERVAL ‘2’ MONTH+INTERVAL ‘4’ DAY- INTERVAL ‘120’ SECOND, ‘DD-MON-YY’) AS "daTe"
FROM DUAL;
Answer: E
Q239.Examine the description of the PRODUCT
STATUS table
Null? Type
NOT NULL NUMBER(2) NOT NULL VARCHAR2 (15)
:Name
PROD_ID
STATUS
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
product
status WHERE status = ‘OUT OF STOCK’
C)SELECT PROD_ID||q’(‘s not available)’ FROM product_ status WHERE status = ‘OUT OF STOCK’
D) SELECT PROD_ID||q’(‘s not available)’ “CURRENT AVAILABILITY”
FROM
product_ status WHERE status = ‘OUT OF STOCK’
E) SELECT prod_id q’s not available” from product_ status WHERE status = ‘OUT OF STOCK’
F)SELECT prod_id “CURRENT AVAILABILITY”||q’ (‘s not available)’ from product_ status WHERE status = ‘OUT OF STOCK’
Answer: CD
Q240.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: BCE
Q241.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: D
Q242.which is true about the round,trunc and mod functions>?
A) ROUND(MOD(25,3),-1) IS INVALID
B) ROUND(MOD(25,3),-1) AND TRUNC(MOD(25,3),-1) ARE BOTH VALID AND GIVE THE SAME RESULT.
C) ROUND(MOD(25,3),-1) AND TRUNC(MOD(25,3),-1) ARE BOTH VALID AND GIVE THE DIFFERENT RESULTS.
D) TRUNC(MOD(25,3),-1) IS INVALID.
Answer: B

你可能感兴趣的:(【Oracle学习】OCP-071 练习题下)