Sie sind auf Seite 1von 26

1

Marks: 1
Click the exhibit(s) button to examine the structure of the PRODUCT table. PRODUCT_ID NUMBER NOT
NULL PRODUCT_NAME VARCHAR2(25) SUPPLIER_ID NUMBER NOT NULL LIST_PRICE
NUMBER(7,2) COST NUMBER(5,2) QTY_IN_STOCK NUMBER(4) LAST_ORDER_DT DATE DEFAULT
SYSDATE NOT NULL Which SELECT statement display the number of items whose LIST_PRICE is
greater than $400.00 ?
Choose at least one answer.
a. SELECT COUNT(*) FROM product ORDER BY list_price;
b. SELECT SUM(*) FROM product WHERE list)price > 400;
c. SELECT SUM(*) FROM product GROUP BY list_price > 400;
d. SELECT COUNT(*) FROM product WHERE list_price > 400;

2
Marks: 1
Click the Exhibit(s) button to examine the structure of the PRODUCT table. PRODUCT_ID NUMBER
NOT NULL PRODUCT_NAME VARCHAR2(25) SUPPLIER_ID NUMBER NOT NULL LIST_PRICE
NUMBER(7,2) COST NUMBER(5,2) QTY_IN_STOCK NUMBER(4) LAST_ORDER_DT DATE DEFAULT
SYSDATE NOT NULL Evaluate this SQL statemnt : SELECT supplier_id, AVG(cost) FROM product
WHERE AVG(list_price) > 60.00 GROUP BY supplier_id OREDR BY AVG(cost) DESC; Which clause will
cause an error ?
Choose one answer.
a. SELECT
b. WHERE
c. ORDER BY
d. GROUP BY

3
Marks: 1
Evaluate this SQL statement: SELECT product_id, product_name, price FROM product WHERE
supplier_id IN (SELECT supplier_id FROM product WHERE price > 120 OR qty_in_stock > 100); Which
value will be displayed ?
Choose one answer.
a. The PRODUCT_ID, PRODUCT_NAME, and PRICE of products that are priced greater than $120.00
and have a QTY_IN_STOCK value greater than 100 and have a supplier.
b. The PRODUCT_ID, PRODUCT_NAME, and PRICE of products supplied by a supplier with
products that are priced greater than $120.00 or with products that have QTY_IN_STOCK value
greater than 100.
c. The PRODUCT_ID, PRODUCT_NAME, and PRICE of products that are priced greater than $120.00
and have a QTY_IN_STOCK value greater than 100.
d. The PRODUCT_ID, PRODUCT_NAME, and PRICE of products that are priced greater than $120.00
or that have a QTY_IN_STOCK value greater than 100.

4
Marks: 1
Evaluate this SQL*Plus command : COLUMN teacher_name HEADING ?Teacher? FORMAT A25 Which
two tasks will this command accomplish ? (Choose two.)
Choose at least one answer.
a. It will limit the TEACHER_NAME column heading to 25 characters.
b. It will display the current settings for the TEACHER_NAME column.
c. It will set TEACHER_NAME column heading to ?Teacher?.
d. It will center the column heading the TEACHER_NAME column.
e. It will set the display width of the TEACHER_NAME column to 25.

5
Marks: 1
The ACCOUNT table contains these columns : ACCOUNT_ID NUMBER(12) NEW_BALANCE
NUMBER(7,2) PREV_BALANCE NUMBER(7,2) FINANCE_BALANCE NUMBER(7,2) With the least
amount of effort, you want to display all of the ACCOUNT table records. Which query should you use ?
Choose one answer.
a. SELECT account_id, new_balance, prev_balance, finance_charge FROM account;
b. SELECT any FROM account;
c. SELECT all FROM account;
d. SELECT * FROM account;

6
Marks: 1
Click the Exhibit(s) button to examine the structure of the EMPLOYEE table : EMPLOYEE_ID NUMBER,
NOT NULL, Primary Key EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID
NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER HIRE_DATE DATE The MGR_ID
column currently contains identification numbers, and you need to allow users to include text character in
the identification values. Which statement should you use to implement this ?
Choose one answer.
a. ALTER employee MODIFY(mgr_id VARCHAR2(15));
b. You CANNOT modify the data type of the MGR_ID column
c. ALTER TABLE employee MODIFY(mgr_id VARCHAR2(15));
d. ALTER TABLE employee REPLACE(mgr_id VARCHAR2(15));
e. ALTER employee TABLE MODIFY COLUMN(mgr_id VARCHAR2(15));

7
Marks: 1
Evaluate this statement : TRUNCATE TABLE inventory; Which three users could successfully issue this
statement ? (Choose two.)
Choose at least one answer.
a. any member of the CONNECT and RESOURCE roles
b. any user with the DROP ANY TABLE system privilege
c. the owner of the INVENTORY table
d. any user with the DELETE object privilege on the INVENTORY table
e. any user with access to the PUBLIC

8
Marks: 1
Evaluate this statement SELECT* FROM USER_CONS_COLUMNS; Logged on as user Ann, which task
would you accomplish using this stement ?
Choose one answer.
a. determine the type of constraint on the DEPT_ID column of the DEPARTMENT table in the user
Chan schema
b. display the names of the constraints on the table you can access
c. count the number of UNIQUE constraints in your schema
d. display the column associated with the constraint in the table you own

9
Marks: 1
Examine the structures of the PLAYER and TEAM tables : PLAYER ----------- PLAYAER_ID NUMBER PK
LAST_NAME VARCHAR2(30) FIRST_NAME VARCHAR2(25) TEAM_ID NUMBER MGR_ID NUMBER
SIGNING_BONUS NUMBER(9,2) TEAM -------- TEAM_ID NUMBER TEAM_NAME VARCHAR2(30)
Which two situations would require a subquery to retun the desire result ? (Choose two.)
Choose at least one answer.
a. a list of all teams that have more than 11 players
b. a list of all players that are also managers
c. a list of all players who play on the same team with ?John Wilcox?
d. a list of all players, including manager name and signing bonus than their manager
e. a list of all players who received a signing bonus that was lower than the average

10
Marks: 1
The LINE_ITEM table contains these columns : LINE_ITEMID NUMBER(9) ORDER_ID NUMBER(9)
PRODUCT_ID VARCHAR2(9) QUANTITY NUMBER(5) You created a sequence called
LINE_ITEMID_SEQ to generate sequential values for the LINE_ITEMID column. Evaluated this SELECT
statement : SELECT line_itemid_seq. CURVAL FROM dual; Which task will this statement accomplish ?
Choose one answer.
a. increments the LINE_ITEMID column
b. display the current value of the LINE_ITEMID_SEQ sequence
c. display the next value of the LINE_ITEMID_SEQ sequence
d. populates the LINE_ITEMID_SEQ sequence with the next value

11
Marks: 1
The STUDENT table contains these columns: ID NUMBER(9) LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25) ENROLL_DATE DATE Evaluate these two statement: 1.SELECT
CONCAT(INITCAP(first_name), INITCAP(last_name)) FROM student WHERE enroll_date < ?31-DEC-
2002?; 2.SELECT INITCAP(first_name) || INITCAP(last_name) FROM student WHERE enroll_date <
?31-DEC-2002?; Which statement is true ?
Choose one answer.
a. The two statement will retrieve the same data, but the format of the display will differ.
b. The two statement will display the same data.
c. The two statement will NOT display the same data.
d. One of the statement will fail because it contains a syntax error.

12
Marks: 1
The PERSONNEL table contains these columns : ID NUMBER(9) LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25) MANAGER_ID NUMBER(9) DEPT_ID NUMBER(9) Evaluate this SQL
statement : SELECT p.dept_id, p.first_name|| ? ? ||p.last_name employee, c.first_name|| ? ?
||c.last_name coworker FROM personnel p, personnel c WHERE p.dept_id = c.dept_id AND p.id <> c.id;
Which result will the statement provide ?
Choose one answer.
a. It will display each department, the manager in each department, and all employees in each
department.
b. It will display each employee?s department number, name, and their manager?s name.
c. It will return a syntax error.
d. It will display each employee?s department number, name, and all their coworkers in the same
departement.

13
Marks: 1
Which clause you use to limit the price value to 100.00 or less ?
Choose one answer.
a. CONSTRAINT inventory_price_ck CHECK (price < = 100.00)
b. CONSTRAINT CHECK inventory_price_ck (price <= 100.00)
c. CONSTRAINT inventory_price_ck CHECK (price < 100.00)
d. CONSTRAINT CHECK inventory_price_ck (price < 100.00)
e. CONSTRAINT inventory_price_ck CHECK (price IN (100.00))

14
Marks: 1
You have redo log members in each redo log group in your database. You are required to add a redo log
member to an existing group in your database to increase the probability of recovering the redo logs in
case of any failure. What will happen if you attempt to add a member to an existing group without using
the SIZE option ?
Choose one answer.
a. The Oracle server will use a multiple of the DB_BLOCK_SIZE parameter
b. The Oracle server will use the size of the existing members in the group
c. The statement will fail.
d. The Oracle server will use the default redo log member size.
e. The statement will prompt for the size of the redo log file.

15
Marks: 1
Your server computer is configured to use the Local naming method. The tnsname.ora an sqlnet.ora files
on your computer contain the following information : TNSNAMES.ORA MASTER=(DESCRIPTION=
(ADDRESS= (PROTOCOL=tcp) (HOST=TELSTAR) (PORT=1521)) (CONNECT DATA=
(SERVICE_NAME=LOC))) SQLNET.ORA
NAMES.DEFAULT_DOMAIN=US.TELSATAR.COMNAMES.DIRECTORY_PATH=(LDAP, TNSNAME,
HOSTNAME) What will happen when you try to connect to your database server by using these
configuration settings ?
Choose one answer.
a. You will conncet to the database by using the Directory naming method.
b. You will conncet to the database by using the Host naming method.
c. You will receive an error while trying to connect to the database.
d. You will conncet to the database by using the Easy Connect naming method.
e. You will conncet to the database by using the Local naming method.

16
Marks: 1
The STUDENT table contains these columns: ID NUMBER(9) PK LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25) STU_TYPE VARCHAR2(1) ENROLL_DATE DATE Evaluate this iSQL
*Plus script: SELECT id, last_name, first_name, enroll_date FROM student WHERE stu_type = ?&stype?
AND enroll_date between &&date and &&date / What happens when this script is run a second time in
the same session ?
Choose one answer.
a. An error occurs because the BDATE and EDATE substitution variables are NOT correctly
specified.
b. The user is prompted for all three substitution variables.
c. The values of BDATE and EDATE from the previous execution are used.
d. An error occurs because the STYPE substitution variable is NOT correctly specified.

17
Marks: 1
How many values could a subquery used with the <> operator return ?
Choose one answer.
a. up to 10
b. unlimited
c. up to 2
d. only 1

18
Marks: 1
An application view is no longer needed. Which SQL statement should you use to remove the
TRNAS_HITS_V view?
Choose one answer.
a. DROP VIEW trans_hist_v;
b. DELETE trans_hist_v;
c. TRUNCATE VIEW trans_hist_v;
d. DROP trans_hist_v;

19
Marks: 1
The STUDENT table contains these columns : ID NUMBER(9) Primary Key LAST_NAME
VARCHAR2(25) FIRST_NAME VARCHAR2(25) ENROLL_DATE DATE You create a report that displays
the column headings and data in this format : Student Name Enrolled ----------------------------- Jones,
Jennifer 12-SEP-01 Which two statements concerning this report?s SELECT statement are true (Choose
two.)
Choose at least one answer.
a. A format mask must have been used on the ENROLL_DATE column
b. The display lengths of the LAST_NAME and FIRST_NAME column are increased.
c. One column alias is used for the LAST_NAME and FIRST_NAME columns.
d. Separate column aliases are used for the LAST_NAME, FIRST_NAME and ENROLL_DATE
columns.
e. The LAST_NAME and FIRST_NAME columns are concatenated togethe

20
Marks: 1
Which construct can be used to return data based on an unknown condition ?
Choose one answer.
a. a subquery
b. a WHERE clause with an OR condition
c. an ORDER BY clause
d. a GROUP BY clause

21
Marks: 1
The SUPPLIER table constraints these columns : S_ID NUMBER PK NAME VARCHAR2(30)
LOCATION_ID NUMBER ORDER_DT DATE ORDER_AMOUNT NUMBER(8,2) Which clauses represent
valid uses of aggregate functions ? (Choose all that apply.)
Choose at least one answer.
a. SELECT MAX(AVG(order_amount))
b. WHERE MIN(order_amount) = order_amount
c. FROM MAX(order_dt)
d. SELECT SUM(order_amount)
e. SELECT location_id, order_dt, MAX(order_amount)
f. SELECT SUM(order_dt)

22
Marks: 1
The STUDENT table contains these columns : FIRST_NAME VARCHAR2(25) ENROLL_DATE DATE
You need to display the ENROLL_DATE values in this format : 25th of Febuary 2002
Choose one answer.
a. SELECT TO_CHAR (enroll_date,?DDspth?of? Month YYYY?) FROM student;
b. SELECT enroll_date(?DDspth ?of? Month YYYY?) FROM student;
c. SELECT TO_CHAR (enroll_date,?DDTH ?of? Month YYYY?) FROM student;
d. SELECT TO_CHAR (enroll_date,?ddth ?of? Month YYYY?) FROM student;

23
Marks: 1
Which logical condition operator, used in a WHERE clause, returns TRUE only when both of the
conditions are true ?
Choose one answer.
a. NOT
b. OR
c. AND
d. LIKE

24
Marks: 1
A new standard has been adopted in your department that all codes that contain only 3 characters must
have a dash (-) and two character values appended to them. Which function can be used in your query to
restrict the data displayed to only those codes containing 3 characters?
Choose one answer.
a. LENGTH
b. RPAD
c. REPLACE
d. SUBSTR

25
Marks: 1
The DEPARTMENT table contains these colums: DEPT_ID NUMBER, Primary Key DEPT_ABBR
VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER The EMPLOYEE table contains these
columns EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25)
DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER HIRE_DATE DATE
Evaluate this statement: ALTER TABLE employee ADD CONSTRAINT mgr_id_fk FOREIGN KEY
(mgr_id) REFERENCES department(mgr_id); Which task will this statement accomplish?
Choose one answer.
a. Prevents rows in the EMPLOYEE table from being deleted if they are referenced in the department
table
b. Creates a referential constraint from the EMPLOYEE table to the EMPLOYEE table
c. Creates a referential constraint from the EMPLOYEE table to the DEPARTMENT table
d. Prevents data from being inserted into the DEPARTMENT table that violates the constraint on the
EMPLOYEE table

26
Marks: 1
Evaluate this CREATE TABLE statement: CREATE TABLE customer ( customer_id NUMBER,
company_name VARCHAR2(30), contact_name VARCHAR2(30), contact_title VARCHAR2(30), address
VARCHAR2(30), city VARCHAR2(25), region VARCHAR2(10), postal_code VARCHAR2(20), country _id
NUMBER DEFAULT 25, phone VARCHAR2(20), fax VARCHAR2(20), credit_limit NUMBER(7,2); Which
three business requirements will this statement accomplish ? (Choose two)
Choose at least one answer.
a. All customer identification values are only 6 digits so the column should be fixed in leght.
b. Company identification values could be either numbers or characters or a combination of both.
c. The value 25 should be used if no values is provided for the country identification when a record is
inserted.
d. Credit limit values can be up to $1.000.000.
e. Phone number values can range from 7 to 20 character so the column should be variable in
leght.

27
Marks: 1
For which two type of constraints will a unique index be automatically created ? (Choose two)
Choose at least one answer.
a. CHECK
b. UNIQUE
c. FOREGN KEY
d. PRIMARY KEY
e. NOT NULL

28
Marks: 1
Eri is working in a database server, which has been recently configured for a shared server environment.
Upon analysis, he realize that there has been an increase in memory demands for the SGA component
for the SGA component because some memory structures are now accommodated int th SGA. Which
component of the SGA should be allocated more memory to ensure that the new memory demands are
met ?
Choose one answer.
a. large pool
b. shared pool
c. java pool.
d. database buffer cache
e. program global area

29
Marks: 1
Click the Exhibit(s) button to examine the structures of the EMPLOYEE, PROJECT, and TASK tables.
EMPLOYEE ---------------- EMPLOYEE_ID NUMBER, NOT NULL, Primary Key EMP_LNAME
VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID
NUMBER SALARY NUMBER HIRE_DATE DATE PROJECT ------------- PROJECT_ID NUMBER NOT
NULL, Primary Key PROJECT_NAME VARCHAR2(30) MGR_ID NUMBER PROJECT_TYPE
VARCHAR2(10) BEGIN_DT DATE END_DT DATE TASK -------- PROJECT_ID NUMBER NOT NULL,
Primary Key, Foreign Key to PROJECT_ID of the PROJECT table. TASK_ID NUMBER NOT NULL,
Primary Key EST_COMPL_DATE DATE EMPLOYEE_ID NUMBER Foreign Key to EMPLOYEE_ID of the
EMPLOYEE table. You want to create a report of all employees, including employee name and project
name, who are assigned to project tasks. You want to include all projects even if they currently have no
tasks defined, and you want to include all tasks, even those are not assigned to an employee. Which join
should you use ?
Choose one answer.
a. a NATURAL JOIN between the TASK and EMPLOYEE tables and a LEFT OUTER JOIN between
the TASK and PROJECT tables.
b. a FULL OUTER JOIN between the TASK and EMPLOYEE tables and a FULL OUTER JOIN
between the TASK and PROJECT tables.
c. a FULL OUTER JOIN between the TASK and EMPLOYEE tables and a NATURAL JOIN between
the TASK and PROJECT tables.
d. a NATURAL JOIN between the TASK and EMPLOYEE tables and a NATURAL JOIN between the
TASK and PROJECT tables.
e. a LEFT OUTER JOIN between the TASK and EMPLOYEE tables and a RIGHT OUTER JOIN
between the TASK and PROJECT tables.
f. a SELF JOIN on the EMPLOYEE table and a LEFT OUTER JOIN between the TASK and PROJECT
tables.

30
Marks: 1
For which column woulmn you create an index ?
Choose one answer.
a. a column containing a wide range of values
b. a column with a small number of null values
c. a column that is updated frequently
d. a column that is small

31
Marks: 1
Click the Exhibit(s) button to examine the structure of the LINE_ITEM table. PRODUCT_ID QUANTITY
ORDER_IT LINE_ITEM_ID -------------------- --------------- --------------- --------------------- A-2356 7 1494 2 Z-
79 5 1494 3 A-7849 18 1533 3 LINE_ITEM_ID ORDER_ID PRODUCT_ID QUANTITY --------------------- ---
------------ -------------------- ---------------- 2 1494 A-2356 7 3 1533 A-7849 18 6 1589 C-589 33 1 1533 A-
3209 100 2 1533 A-3210 1 4 1494 Z-78 1 10 1588 C-555 250 3 1494 Z-79 5 Evaluate this SQL statement
: SELECT product_id, quantity FROM line_item WHERE quantity BETWEEN 5 AND 30 ORDER BY
order_id.line_item_id Which PRODUCT_ID would be displayed last ?
Choose one answer.
a. A-2356
b. A-7849
c. Z-79
d. C-555

32
Marks: 1
The PRODUCT table contains these columns : PRODUCT_ID NUMBER NOT NULL PRODUCT_NAME
VARCHAR2(25) SUPPLIER_ID NUMBER NOT NULL LIST_PRICE NUMBER(7,2) COST NUMBER(5,2)
QTY_IN_STOCK NUMBER(4) LAST_ORDER_DT DATE DEFAULT SYSDATE NOT NULL Which
INSERT statement will execute successfully ?
Choose one answer.
a. INSERT INTO product(product_id, product_name, supplier_id, list_price, cost, last_order_dt)
VALUES (&prod_id,?&desc?, &supplier, &list, &cost, DEFAULT);
b. INSERT INTO product VALUES (10,?Ladder-back Chair?, 5, 59.99, 37.32, 1000, 10-JAN-02);
c. INSERT INTO product(product_id, supplier_id, list_price, cost, last_order_dt) VALUES (10, 5,
69.99);
d. INSERT INTO product VALUES (10,?Ladder-back Chair?, 5, 59.99, 37.32, 10000, DEFAULT);
e. INSERT INTO product VALUES (10,?Ladder-back Chair?, NULL, NULL, NULL, NULL,
DEFAULT);

33
Marks: 1
Click the Exhibit(s) button to examine the structure of the LINE_ITEM table. LINE_ITEM_ID NUMBER(9)
NOT NULL, Primary Key ORDER_ID NUMBER(9) NOT NULL, Primary Key, Foreign Key to ORDER_ID
column of the CURR_ORDER table. PRODUCT_ID NUMBER(9) NOT NULL, Foreign Key to
PRODUCT_ID column of the PRODUCT table. You want to display order numbers, product numbers, and
the quantity of the product orderes with these desired results : 1.The volume of the item must be 50 or
greater. 2.The display must be sorted from the lowest to highest by order number and then by product
number. 3.The items must belong to order numbers ranging from 1800 to 1900. Evaluate this SQL script :
SELECT order_id, product_id, quantity FROM line_item WHERE quantity >= 50 AND order_id IN(1800,
1900) ORDER BY order_id, product_id; What does the proposed solution provide ?
Choose one answer.
a. two of the desired results
b. all of the desired results
c. an error statement
d. one of the desired results

34
Marks: 1
Evaluate this iSQL*Plus command : START process_batch.sql Which iSQL*Plus command will achieve
the same results ?
Choose one answer.
a. GET prcosse_batch.sql
b. SAVE prcosse_batch.sql
c. EXECUTE prcosse_batch.sql
d. &prcosse_batch.sql
e. @process_batch.sql

35
Marks: 1
When executed, which statement display a zero if the PREV_BALANCE value is null and the
NEW_BALANCE value is zero ?
Choose one answer.
a. SELECT IS NULL (.009 * prev_balance, 0) + new_balance ?Current Balance? FROM account;
b. SELECT NULL (.009 * prev_balance, 0) + new_balance ?Current Balance? FROM account;
c. SELECT TO NUMBER (.009 * prev_balance, 0) + new_balance ?Current Balance? FROM
account;
d. SELECT NVL (.009 * prev_balance, 0) + new_balance ?Current Balance? FROM account;

36
Marks: 1
Click the Exhibit(s) button to examine the structure of the PATIENT and PHYSICIAN tables PATIENT -----
------- PATIENT_ID NUMBER NOT NULL, Primary Key LAST_NAME VARCHAR2(30) NOT NULL
FIRST_NAME VARCHAR2(25) DOB DATE INS_CODE NUMBER PHYSICIAN ----------------
PHYSICIAN_ID NUMBER NOT NULL, Primary Key LAST_NAME VARCHAR2(30) NOT NULL
FIRST_NAME VARCHAR2(25) LICENSE_NO NUMBER(7) HIRE_DATE DATE Which join type could be
used to produce a report of all patients with physician assigned including patient name and physician
name ?
Choose one answer.
a. the result CANNOT be accomplished because the two tables have no common column
b. equijoin
c. natural join
d. cross join

37
Marks: 1
Click the Exhibit(s)button to examine the data in the PRODUCT table. ID_NUMBER DESCRIPTION
MANUFACTURER_ID QUANTITY COST ------------------- --------------------- ------------------------------ ------------
--- -------- 215 AAA 6pkbattery NF10032 546 3.00 140 AA 2pk-battery EL7966 2000 603 D 2pk-battery
OT456 318 1.10 725 C 2pk-battery OT456 239 .75 218 AAA 6pk-battery OT456 980 3.15 220 AAA 8pk-
battery NF10032 4.20 126 AA 2pk-battery NF10032 2513 751 C 2pk-battery EL7968 84 1.00 Evaluate
this SELECT statement : SELECT description, cost FROM product ORDDER BY cost, quantity; Which
statements are true ? (Choose all that apply.)
Choose at least one answer.
a. No row with a PRODUCT_ID of 220 is displayed.
b. The DESCRIPTION value for the first last two records displayed is ?C 2pk-battery?.
c. The PRODUCT_Ids value for the first last two records displayed are 140 and 126.
d. The DESCRIPTION value for the first last two records displayed is ?AA 2pk-battery?.
e. The PRODUCT_ID value for the first record displayed is 220.

38
Marks: 1
You issue this statement : CREATE PUBLIC SYNONYM part FOR linda.product; Which task was
accomplished by this statement ?
Choose one answer.
a. A new object privilege was assigned.
b. A new system privilege was assigned.
c. The need to qualify an object name with its schema was elimated.
d. A newsegment object was created.

39
Marks: 1
How many levels can subqueries be nested in a FROM clause ?
Choose one answer.
a. 8
b. 16
c. 4
d. 2
e. unlimited

40
Marks: 1
Which statement pertaining to SQL and iSQL*Plus are true ? (Choose two.)
Choose at least one answer.
a. SQL runs on a browser.
b. SQL includes a continuation character.
c. iSQL*Plus can format query results.
d. iSQL*Plus can send SQL statement to the server.
e. SQL and iSQL*Plus are command languages.


41
Marks: 1
Evaluate this SQL statement: SELECT line_item_id, order_id, product_id FROM line_item Which WHERE
clause should you include to test the QUANTITY column for null value?
Choose one answer.
a. WHERE quantity IS NULL;
b. WHERE quantity = NULL;
c. WHERE quantity != NULL;
d. WHERE quantity <> NULL;

42
Marks: 1
Evaluated this SQL statement : SELECT l.order_id, i.description, l.quantity WHERE i.id_number =
l.product_id FROM inventory i, line_item l ORDER BY l.order_id, i.description; The statement fails when
executed. Which change will correct the problem?
Choose one answer.
a. Reorder the clauses in the statement.
b. Use the table names instead of the table aliases in the ORDER BY clause.
c. Remove the table alias from the ORDER BY clause, and use only the column name.
d. Remove the table aliases from the FROM clause.

43
Marks: 1
The PO_DETAIL table contains these columns : PO_NUM NUMBER NOT NULL Primary Key
PO_LINE_ID NUMBER NOT NULL Primary Key PRODUCT_ID NUMBER Foreign Key to PRODUCT_ID
column of the PRODUCT table QUANTITY NUMBER UNIT_PRICE NUMBER(5.2) On which column(s) is
an index automatically created for the PO_DETAIL table?
Choose one answer.
a. both PO_NUM and PO_LINE_ID
b. PO_NUM only
c. PO_LINE_ID only
d. UNIT_PRICE only
e. PRODUCT_ID only

44
Marks: 1
The EVENT table constraints these columns : EVENT_ID NUMBER EVENT_NAME VARCHAR2(30)
EVENT_DESC VARCHAR2(100) EVENT_TYPE NUMBER LOCATION_ID NUMBER You have been
asked tp provide a report of the number of defferent event types at each location. Which SELECT
statement will produce the desire result?
Choose one answer.
a. SELECT UNIQUE(location_id), COUNT(event_type) FROM event GROUP BY lacation_id;
b. SELECT COUNT(*), DISTINCT(location_id) FROM event;
c. SELECT location_id, COUNT(DISTINCT event_type) FROM event GROUP BY location_id;
d. SELECT location_id, MAX(DISTINCTevent_type) FROM event GROUP BY location_id;
e. SELECT DISTINCT(event_type) FROM event GROUP BY location_id;

45
Marks: 1
Seniority is based on the number of years a student has been enrolled at the university. You must create
a report that displays each student?s name, id number, and the number of years enrolled. The years
enrolled must be rounded to whole number, based on the number of months from the date enrolled until
today. Which statement produces the required results ?
Choose one answer.
a. SELECT first_name||?, ?||last_name ?Student Name?, id ?Id?, enroll_date,
TRUNC(SYSDATE,?YY?) ? TRUNC(enroll_date,?YY?) ?Seniority? FROM student;
b. SELECT first_name||?, ?||last_name ?Student Name?, id ?Id?, enroll_date, (ROUND(SYSDATE) ?
ROUND(enroll_date)) / 12 ?Seniority? FROM student;
c. SELECT first_name||?, ?||last_name ?Student Name?, id ?Id?, enroll_date,
ROUND(MONTHS_BETWEEN(SYSDATE, enroll_date)/ 12) ?Seniority? FROM student;
d. SELECT first_name||?, ?||last_name ?Student Name?, id ?Id?, enroll_date, ROUND(SYSDATE) ?
ROUND(enroll_date) ?Seniority? FROM student;

46
Marks: 1
Click the Exhibit(s) button to examine the structure of the EMPLOYEE and CURR_ORDER tables.
EMPLOYEE ---------------- EMPLOYEE_ID NUMBER, NOT NULL, Primary Key EMP_LNAME
VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID
NUMBER SALARY NUMBER HIRE_DATE DATE CURR_ORDER -------------------- ORDER_ID NUMBER
NOT NULL, Primary Key CUSTOMER_ID NUMBER Foreign Key to CUSTOMER_ID column of the
CUSTOMER table. EMPLOYEE_ID NUMBER Foreign Key to EMP_ID coumn of the EMPLOYEES table.
ORDER_DATE DATE ORDER_AMT NUMBER(7,2) SHIP_METHOD VARCHAR2(5) To keep your top
sales representatives motivated, your company plans to increase the commissions of employees. You
need to create a SELECT statement that returns the name, commission, and maximum order amount
associated with employee for all employees whose commission is less than 8 percent of their maximum
order amount. Which SELECT statement should you use ?
Choose one answer.
a. SELECT e.last_name, e.first_naem, e.commission, MAX(o.order_amount) FROM employee e,
curr_order WHERE e.employee_id = o.employee_id AND e.commission < .08 * (SELECT employee_id,
MAX(order_amt) MAXAMT FROM curr_order GROUP BY employee_id;
b. SELECT e.last_name, e.first_name, e.commision, o.maxamt FROM employee e, (SELECT
employee_id, MAX(order_amt) MAXAMT FROM curr_order GROUP BY employee_id) o WHERE
e.employee_id = o.employee_id AND e.commision < .08 * maxamt;
c. SELECT e.last_name, e.first_name, e.commission, MAX(o.order_amount) MAXAMT FROM
employee e, curr_order o WHERE e.employee_id = o.employee_id AND e.commission < .08 * o.maxamt
GROUP BY e.last_name, e.first_name, e.commission;
d. SELECT last_name, first_name, commision, max_amt FROM employee , (SELECT employee_id,
MAX(order_amt) MAXAMT FROM curr_order GROUP BY employee_id) WHERE employee.employee_id
= curr_order.employee_id AND commision < .08 * maxamt;

47
Marks: 1
The TEACHER table contains these columns: ID NUMBER(9) Primary Key LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25) SUBJECT_ID NUMBER(9) Which query should you use to display only
full name of each teacher along with the identification number of the subject they are responsible for
teaching ?
Choose one answer.
a. SELECT last_name, first_name, subject_id FROM teacher;
b. SELECT last_name, subject_id FROM teacher;
c. SELECT * FROM teacher;
d. SELECT last_name, first_name, id FROM teacher;

48
Marks: 1
Examine the structures of the DEPARTEMENT and ASSET tables : DEPARTEMENT ------------------------
DEPT_ID NUMBER(9) NOT NULL DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(25) NOT
NULL MGR_ID NUMBER ASSET ---------- ASSET_ID NUMBER(9) NOT NULL ASSET_VALUE FLOAT
ASSET_DESCRIPTION VARCHAR2(25) DEPT_ID NUMBER(9) The DEPT_ID column of the ASSET
table has a FOREIGN KEY constraint referencing the DEPARTEMENT table. You attempt to update the
UPDATE table using this statement : UPDATE asset SET dept_id = (SELECT dept_id FROM
departement WHERE dept_name = (SELECT dept_name FROM departement WHERE dept_abbr =
?FINC?)), asset_value = 10000 WHERE asset_id = 2 Which two statements must be true for this
UPDATE statement to execute without generating an error? (Choose two)
Choose at least one answer.
a. Only one row in the DEPARTEMENT table can have a DEPT_NAME value as the DEPT_ABBR of
?FINC?.
b. One of subqueries should be removed because subqueries CANNOT be nested
c. Only one row in the DEPARTEMENT table can have a DEPT_ABBR value of ?FINC?.
d. An asset with an ASSET_ID value of 2 must exist in the ASSET table.
e. Both of subqueries used in the UPDATE statement must return one and only one non-null values.

49
Marks: 1
Which statement concerning SQL function is true ?
Choose one answer.
a. Single-row function can only be used in SELECT and WHERE clauses.
b. Character functions can return character or number values
c. Conversion function convert a column definition from one data type to another data type.
d. All date function return DATE data type values

50
Marks: 1
You plan to query data using the TRANS_HIST_V view that was created by another user in their schema.
Which statement is true ?
Choose one answer.
a. The Oracle Server will retrieve the view definition from the ALL_VIEWS data dictionary view.
b. The Oracle Server will verify whether you have been granted access pprivileges to the
TRANS_HIST_V view.
c. The Oracle Server will automatically reset the ARRAYSIZE value so the TRANS_HIST_V query will
execute successfully.
d. The Oracle Server will retrieve data, detemined by the query criteria, from the TRANS_HIST_V
view.


51
Marks: 1
Which two statement about NOT NULL constraint are true ? (Choose two)
Choose at least one answer.
a. A NOT NULL constraint is stored in the data dictionary as a UNIQUE constraint.
b. You can modify the structure of a NOT NULL constraint using the ALTER TABLE statement.
c. NOT NULL constraint can only be defined at the column level.
d. You CANNOT define a NOT NULL column if the column does NOT have a non-null value for every
row.
e. You CANNOT add a NOT NULL constraint to an existing column using the ALTER TABLE
statement.

52
Marks: 1
Which two statements about the evaluation of clause in a SELECT statement are true ? (Choose two).
Choose at least one answer.
a. The Oracle Server will evaluate a WHERE clause before a GROUP BY clause.
b. The Oracle Server will evaluate a GROUP BY clause before a HAVING clause.
c. The Oracle Server will evaluate a HAVING clause before a WHERE clause.
d. The Oracle Server will evaluate an ORDER BY clause before a HAVING clause.
e. The Oracle Server will evaluate an ORDER BY clause before a WHERE clause.

53
Marks: 1
Click the Exhibit(s) button to examine the data in the WORKORDER table . WO_ID CUST_ID
REQIRED_DT COMPL_DT AMOUNT ---------- ------------ ------------------- --------------- -------------- 1 1 04-
DEC-2001 02-DEC-01 520.32 2 1 02-JAN-2002 3 2 17-JAN-2002 4 2 20-JAN-2002 05-JAN-2002 274.11
6 3 14-JAN-2002 13-JAN-2002 400.00 7 3 04-FEB-2002 8 4 01-FEB-2002 9 5 14-
JAN-2002 The WORKORDER table contains these column: WO_ID NUMBER PK CUST_ID NUMBER
REQUIRED_DT DATE COMPL_DT DATE AMOUNT NUMBER(7,2) Which statement regarding the use
of aggregate functions on the WORKORDER table is true ?
Choose one answer.
a. Using the SUM aggregate function on the AMOUNT column will result in erroneous results because
the column contains null values.
b. Using the SUM aggregate function with the AMOUNT column is allowed in any portion of a
statement.
c. Using the MIN aggregate function on the COMPL_DT column will return a null value.
d. Grouping the REQUIRED_DT and COMPL_DT columns is NOT allowed.
e. Using the AVG aggregate function on the AMOUNT column ignores null values.
f. Using the AVG aggregate function with any column in the table is allowed.

54
Marks: 1
Why would you NOT create an index on a column in the CLASS_SCHEDULE table ?
Choose one answer.
a. to reduce disk I/O
b. to speed up queries if the table is small
c. to speed up queries that include a foreign key reference to the STUDENT table.
d. to speed up row retrieval
e. to speed up queries that returned less than 3 percent of the rows.

55
Marks: 1
Click the exhibit(s) button to examine the data from DONATION table.
PLEDGE_ID DONOR_ID PLEDGE_DT AMOUNT_PLEDGED AMOUNT_PAID PAYMENT_DT ------
----------- ---------------- ------------------- ----------------------------- --------------------- -------------------
1 1 10-SEP-2001 1000 1000 02-OCT-2001
2 1 22-FEB-2002 1000 3 2 08-OCT-
2001 10 10 28-OCT-2001 4 2 10-DEC-
2001 50 5 3 02-NOV-
2001 10000 9000 28-DEC-2001 6 3 05-JAN-
2002 1000 1000 31-JAN-2001 7 4 09-NOV-
2001 2100 2100 15-DEC-2001 8 5 09-DEC-
2001 110 110 29-DEC-2001 This statement fails when executed.
SELECT amount_pledged, amount_paid FROM donation WHERE donor_id = (SELECT donor_id FORM
donation WHERE amount_pledged = 1000.00 OR pledge_dt = ?05-JAN-2002?); Which two changes
could correct the problem ? (Choose two.)
Choose at least one answer.
a. Include the DONOR_ID column in the select list of the outer query.
b. Remove the subquery WHERE clause.
c. Change the outer query WHERE clause to ?WHERE donor_id LIKE?.
d. Remove the single quotes around the date value in the inner query WHERE clause.
e. Change the subquery WHERE clause to ?WHERE clause to ?WHERE amount_pledged = 1000.00
AND pledge_dt = ?05-JAN-2002??.
f. Change the outer query WHERE clause to ?WHERE donor_id IN?.

56
Marks: 1
Which of two statements regarding the use of subqueries are true ? (choose two)
Choose at least one answer.
a. A subquery can be used in the VALUES clause of an INSERT statement, if it returns more than one
row.
b. A subquery CANNOT be used in the GROUP BY clause of a SELECT statement.
c. A subquery used in an INTO clause of a SELECT statement must return only one column, but can
return multiple rows.
d. A subquery can be used in a CREATE VIEW statement, regardless of the number of rows it
returns.
e. A subquery can be used in the SET clause of an UPDATE statement, regardless of the number of
rows it returns.
f. A subquery used with the IN operator must return multiple rows.

57
Marks: 1
Which SELECT statement will return a numeric value ?
Choose one answer.
a. SELECT (SYSDATE + enroll_date) + TO_DATE(?29-MAY-02)FROM student;
b. SELECT SYSDATE ? enroll_date + TO_DATE(?29-MAY-02?)FROM student;
c. SELECT (14 + enroll_date) + 30.5 * 9 FROM student;
d. SELECT (SYSDATE ? enroll_date) + 30.5 * 9 FROM student;

58
Marks: 1
You query the database with this SQL statement : SELECT bonus FROM salary WHERE bonus
BETWEEN 1 AND 250 OR (bonus IN(190,500,600) AND bonus BETWEEN 250 AND 500); Which value
could the statement return?
Choose one answer.
a. 400
b. 100
c. 600
d. 260

59
Marks: 1
Which two statements regarding the valid used of single-row and multiple-row subqueries are true ?
(Choose two.)
Choose at least one answer.
a. Single-row subqueries can only be used in a WHERE clause.
b. Multiple-row subqueries can be used with both single-row and multiple-row operators.
c. Single-row operators can only be used with single-row subqueries.
d. Multiple-row subqueries can be used with the LIKE operator.
e. Multiple-row subqueries can be used in a WHERE clause and the INTO portion of an INSERT
statement.

60
Marks: 1
The SERVICE table contains these columns : ID NUMBER PK SERVICE_DATE DATE TECHNICIAN_ID
NUMBER DESCRIPTION VARCHAR2(50) Which SELECT statement could you use to display the
number of times each technician performed a service between January 1, 2001 and June 20, 2001 ?
Choose one answer.
a. SELECT COUNT(*) FROM services WHERE service_date bBETWEEN?01-JAN-2001? AND ?30-
JUN-2001? GROUP BY service_date;
b. SELECT technician_id,service_date,COUNT(*) FROM services WHERE service_date
BETWEEN?01-JAN-2001? AND ?30-JUN-2001? ORDER BY technician_id, service_date;
c. SELECT COUNT(service_date) FROM services WHERE service_date bBETWEEN?01-JAN-2001?
AND ?30-JUN-2001? GROUP BY service_date;
d. SELECT technician_id, COUNT(technician_id) FROM services WHERE service_date
BETWEEN?01-JAN-2001? AND ?30-JUN-2001? ORDER BY technician_id;


61
Marks: 1
You disable the PRIMARY KEY constraint on the ID column in the INVENTORY table and updated all the
values in the INVENTORY table. You need to enable the constraint and verify that the new ID column
values do not violate the constraint. If any of the ID column value do not conform to the constraint, an
error message should be returned. Evaluate this statement : ALTER TABLE inventory ENABLE
CONSTRAINT inventory_id_pk; Which statement is true ?
Choose one answer.
a. The statement will achieves the desired results.
b. The statement will return a syntax error.
c. The statement will execute, but will NOT enable the PRIMARY KEY constraint.
d. The statement will execute, but will NOT verify that values in the ID column do NOT violate the
constraint.

62
Marks: 1
Which SELECT statement should you use if you want to display unique combinations of the POSITION
and MANAGER values from the EMPLOYEE table ?
Choose one answer.
a. SELECT position, manager DISTINCT FORM employee;
b. SELECT position DISTINCT, manager FORM employee;
c. SELECT DISTINCT position, manager FORM employee;
d. SELECT position, manager FORM employee;

63
Marks: 1
Click the Exhibit(s) button to examine the structure of the EVENT and NEW_EVENT tables. EVENT -------
--- EVENT_ID NUMBER EVENT_NAME VARCHAR2(30) EVENT_DESC VARCHAR2(100)
EVENT_TYPE NUMBER LOCATION_ID NUMBER NEW_EVENT ------------------ EVENT_ID NUMBER
EVENT_NAME VARCHAR2(30) EVENT_DESC VARCHAR2(100) EVENT_TYPE NUMBER START_DT
DATE You execute this MERGE statement: MERGE INTO EVENT e USING (SELECT * FROM
new_event WHERE event_type_id = 4) n ON (e.event_id = n.event_id) WHEN MATCHED THEN
UPDATE SET e.event_type_id = n.event_type_id, e.start_dt = n.start_dt WHEN NOT MATCHED THEN
INSERT (event_id, event_name, event_type_id) VALUES (n.event_id, n.event_name, n.event_type_id);
This MERGE statement generates an error. Which statement describes the cause of the error ?
Choose one answer.
a. The INSERT portion of the statement is invalid.
b. A MERGE statement CANNOT be used with tables that DO NOT have identical structure.
c. The UPDATE portion of the statement is invalid.
d. A subquery CANNOT be used in the USING clause of the MERGE statement.
e. The ON clause of the statement is invalid.
f. Table aliases CANNOT be used in a MERGE statement.

64
Marks: 1
Which three function descriptions are true ? (Choose two.)
Choose at least one answer.
a. The SYSDATE function returns the host machine date and time.
b. The ROUND number function returns a number rounded to the specified column value.
c. The NVL single-row function can be used on VARCHAR2 columns.
d. The LENGTH charcter function returns the number of charcter in an expression.
e. The TRUNC date function returns a date with the time portion of the day truncated to the specified
format unit.
f. The SUBSTR character function replaces a portion of a string, beginning at a defined character
position for a defined length

65
Marks: 1
You issued this statement : GRANT UPDATE ON inventory TO joe WITH GRANT OPTION; Which task
was granted accomplish ?
Choose one answer.
a. Only a system privilege was granted to user Joe.
b. Both an object and a system privilege was granted to user Joe.
c. Only an object privilege was granted to user Joe.
d. User Joe was granted all privileges on the INVENTORY object.

66
Marks: 1
You query the database with this SQL statement: SELECT id_number, NVL(100/quantity, 0) FROM
product; Which SQL SELECT statement capabilities are achieved when this statement is execute ?
Choose one answer.
a. projection, selection and joining
b. selection and projection only
c. projection only
d. selection only

67
Marks: 1
For which would you use the WHERE clause in a SELECT statement ?
Choose one answer.
a. to compare PRODUCT_ID values to 7382
b. to designate the ORDER table location
c. to display only unique PRODUCT_ID values
d. to restricted the rows returned by a GROUP BY clause

68
Marks: 1
For which two condition would you use an equijoin query with the USING keyword ? (Choose two.)
Choose at least one answer.
a. The PRODUCT and VENDOR tables do NOT have columns with identical names.
b. The PRODUCT and VENDOR tables have corresponding columns, but the column in the VENDOR
table contains null values taht need to displayed.
c. You want to perform a natural join of the PRODUCT and VENDOR tables but limit the number of
columns in the join condition.
d. The PRODUCT table contains a columns that references another column in the PRODUCT table.
e. The PRODUCT and VENDOR tables have corresponding columns, but the column in the PRODUCT
table contains null values taht need to displayed.
f. The PRODUCT and VENDOR tables have columns with identical names.

69
Marks: 1
Which statement about sequence is true ?
Choose one answer.
a. Creating a sequence causes sequence numbers are stired in a table.
b. A sequence slows down the efficiency of accessing sequence values cached in memory.
c. A sequence can only be used to create a primary key value.
d. One sequence can be used for multiple table in the same schema.

70
Marks: 1
User Dave cannot remember his password and would like to create a new one:?dave500?. He is not
currently connected to the Oracle Server. User Dave has only been granted the CREATE SESSION
system privilege. Which statement should he execute ?
Choose one answer.
a. User Dave CANNOT change his password.
b. ALTER USER dave NEW PASSWORD dave500;
c. ALTER USER dave IDENTIFIED BY NEW PASSWORD dave500;
d. ALTER USER dave IDENTIFIED BY PASSWORD dave500;
e. ALTER USER dave IDENTIFIED BY dave500;


71
Marks: 1
With which three constructs could a view be created that would prevent a user from deleting rows in the
base table on which the view is based ?
Choose at least one answer.
a. group function
b. DISTINCT keyword
c. inline view
d. subquery
e. GROUP BY clause

72
Marks: 1
Which SQL SELECT statement clause is an example of the selection capability, but not the joining
capability ?
Choose one answer.
a. SELECT id_number, description, cost
b. WHERE d.deptno = 10
c. SELECT *
d. WHERE d.deptno = e.deptno

73
Marks: 1
The ACCOUNT table contains these columns: ACCOUNT_ID NUMBER(12) NEW_BALANCE
NUMBER(7,2) PREV_BALANCE NUMBER(7,2) PAYMENT NUMBER(7,2) FINANCE_CHARGE
NUMBER(7,2) CREDIT_LIMIT NUMBER(7) You execute this statement: SELECT ROWNUM ?Rank?,
account_id, finance_charge FROM (SELECT account_id, finance_charge FROM account ORDER BY
finance_charge DESC) WHERE ROWNUM <= 50; What statement regarding the execution of this
statement is true ?
Choose one answer.
a. The 50 greatest finance charge values were displayed from the highest to the lowest.
b. The statement failed to execute because the ORDER BY does NOT use the Top-n column.
c. The statement failed to execute because an inline view was not used.
d. The ORDER BY clause was ignored because it was NOT places in the outer query.

74
Marks: 1
You issued this statement : REVOKE REFERENCES ON inventory FROM joe CASCADE
CONSTRAINTS; Which two tasks were accomplished by the executing this statement ? (Choose two.)
Choose at least one answer.
a. All the FOREIGN KEY constraints on the INVENTORY table created by user Joe were removed.
b. The ability to create any constraints was revoked from user Joe.
c. All the PRIMARY KEY constraints created by user Joe were removed.
d. All the constraints created by user Joe were removed.
e. The ability to create FOREIGN KEY constraint on the INVENTORY table was revoked from user
Joe.
f. The ability to create PRIMARY KEY constraint was revoked from user Joe.

75
Marks: 1
The ACCOUNT table contains these columns : ACCOUNT_ID NUMBER(12) NEW_BALANCE
NUMBER(7,2) PREV_BALANCE NUMBER(7,2) FINANCE_CHARGE NUMBER(7,2) CREDIT_LIMIT
NUMBER(7,2) You created a Top-n query report for the Marketing Departement that displays the account
numbers and new balance of the 1500 accounts that have the lowest new balance. The results are sorted
by the new balance from lowest to highest. Which two SELECT statements clauses are included in your
query ? (Choose two.)
Choose at least one answer.
a. inner query: SELECT account_id, new_balance ROWNUM
b. outer query: ORDER BY new_balance < = 1500
c. inner query: WHERE ROWNUM < = 1500
d. inner query: ORDER BY new_balance
e. outer query: SELECT account_id ?Account?, new_balance ?Current Bal?, ROWNUM ?Rank?

76
Marks: 1
Evaluate this view definition; CREATE OR REPLACE order_hist_v AS SELECT customer_id,
COUNT(order_id) ?Total Orders? FROM order WHERE order_amt >= 300 GROUP BY customer_id;
Which statement using the ORDER_HIST_V view will execute successfully ?
Choose one answer.
a. INSERT INTO order_hist_v (order_id, customer_id, emp_id, order_dt) VALUES(8456, 292, 104,
?10-OCT-2001?);
b. DELETE FROM order_hist_v WHERE customer_id = 794;
c. SELECT * FROM order_hist_v;
d. UPDATE order_hist_v SET emp_id = 389 WHERE emp_id = 5423 AND order_amt <=50;

77
Marks: 1
Click the Exhibit(s) button to examine the structure of the LINE_ITEM table. LINE_ITEM_ID NUMBER(9)
NOT NULL, Primary Key ORDER_ID NUMBER(9) NOT NULL, Primary Key, Foreign Key to ORDER_ID
column of the CURR_ORDER table PRODUCT_ID NUMBER(9) NOT NULL, Foreign Key to
PRODUCT_ID column of the PRODUCT table You query the database with this SQL statement :
SELECT order_id || ?-? || line_item || ?-? || product_id || ?-? || quantity ?Purchase? FROM line_item;
Which component of the SELECT statement is a literal ?
Choose one answer.
a. quantity
b. ||
c. Purchase
d. -

78
Marks: 1
Which arithmetic operation will return a numeric value ?
Choose one answer.
a. ?17-JUN-1999? * (480/24)
b. ?14-FEB-2002? + 25
c. ?03-JAN-200? - 30
d. TO_DATE(?01-JAN_2001?) ? TO_DATE(?01-DEC-2000?)

79
Marks: 1
Evaluatr this statement : TRUNCATE TABLE inventory; Which two statements about this TRUNCATE
TABLE statement are true ? (Choose two.)
Choose at least one answer.
a. The statement will produce the same result as the ?DELETE inventory? statement.
b. This statement will produce the same result as the ?DROP TABLE inventory? statement.
c. The result of this statement can be reserved by issuing a ROLLBACK.
d. The statement will retain the structure of the INVENTORY table.
e. You must be the owner of the INVENTORY table to issue this statement successfully.
f. The statement will permanently remove all the rows from the INVENTORY table.

80
Marks: 1
Evaluate this SELECT statement : SELECT employee_id, name FROM employee WHERE employee_id
NOT IN (SELECT employee_id FROM employee WHERE departement_id = 30 AND job = ?CLERK?);
What would happens if the inner query returned a NULL value ?
Choose one answer.
a. All the EMPLOYEE_ID and NAME values in the EMPLOYEE table would be displayed.
b. Only the rows with EMPLOYEE_ID values equal to NULL would be included in the results.
c. A syntax error would be returned.
d. No rows would be selected from the EMPLOYEE table.


81
Marks: 1
The TEACHER table in your schema contains these columns : ID NUMBER(9) NOT NULL, Primary Key
LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) SUBJECT_ID NUMBER(9) You execute
this statement : CREATE INDEX teacher_name-idx ON teacher(first_name,last_name); Which statement
is true ?
Choose one answer.
a. You must have the CREATE ANY INDEX privilege for this statement to succeed.
b. The statement will fail because it contains a syntax error.
c. The statement creates a composite non-unique index
d. The statement creates a composite unique index.

82
Marks: 1
Evaluate this statement : CREATE SEQUENCE line_item_id_seq START WITH 10001 MAXVALUE
999999999 NOCYCLE; Which statement about this CREATE SEQUENCE statement is true ?
Choose one answer.
a. The sequence will never reuse any numbers and will increment by 1.
b. The sequence will reuse numbers and will start with 10001.
c. The sequence will continue to generate value after it reaches its maximum value.
d. The CREATE SEQUENCE statement will cause a syntax error because an INCREMENT BY value is
included.

83
Marks: 1
You want to create a view that when queried will display the name, customer identification number, new
balance, finanace charge, and credit limit of all customer. When queried, the display should be sorted by
credit limit from highest to lowest, then by last name alphabetically. The view definition should be created
regardless of the existence of the CUSTOMER or ACCOUNT tables. No DML may be performed when
using this view. Evaluate these statements : CREATE OR REPLACE FORCE VIEW CUST_CREDIT_V
AS SELECT c.last_name, c.first_name, c.customer_id..., a.new_balance, a.finance_charge, a.credit_limit
FROM customer c, account a WHERE c.account_id = a.account_id WITH READ ONLY; SELECT *
FROM cust_credit_c ORDER BY credit_limit DESC, last_name; Which statement is true ?
Choose one answer.
a. The statement will NOT return all of the desired results because the WITH CHECK OPTION clause
is NOT included in the CREATE VIEW statement.
b. The CREATE VIEW statement will fail because a view may NOT be created on tables that do NOT
exist or are NOT accessible by the user.
c. When both statement are execute all of the desired results are archieved.
d. To achieve all of the desired results this ORDER BY clause shoul be added to the CREATE VIEW
statement: ? ORDER BY credit_limit DESC, c.last_name?.

84
Marks: 1
Which condition would allow a user to grant SELECT privileges on the CUSTOMER table to everyone
using the PUBLIC keyword ?
Choose one answer.
a. The user owns the CUATOMER table.
b. The user hs SELECT privileges on the CUATOMER table.
c. The user has been granted the SELECT privileges with the PUBLIC OPTION.
d. The user has been granted the PUBLIC privileges.

85
Marks: 1
Click the Exhibit(s) button to examine the data in the LINE_ITEM table. LINE_ITEM ORDER_ID
PRODUCT_ID QUANTITY ---------------- --------------- --------------------- ---------------- 2 1494 A-2356 7 3 1533
A-7849 18 6 1599 C-599 33 1 1533 A-3209 100 2 1533 A-3210 1 4 1494 Z-78 1 10 1588 C-555 250 3
1494 Z-9 5 You query the databse and return the values 23. Which script did you use ?
Choose one answer.
a. SELECT SUBSTR(product_id, 3) FROM line_item WHERE line_item_id = 2 AND order_id =
1494;
b. SELECT SUBSTR(product_id, 3, -2) FROM line_item WHERE line_item_id = 2 AND order_id =
1494;
c. SELECT SUBSTR(product_id, -3, 2) FROM line_item WHERE line_item_id = 2 AND order_id =
1494;
d. SELECT SUBSTR(product_id, 3, 2) FROM line_item WHERE line_item_id = 2 AND order_id =
1494;

86
Marks: 1
Which data type is a hexadecimal string representing the unique address of a row in its table ?
Choose one answer.
a. RAW
b. ROWID
c. VARCHAR2
d. BFILE

87
Marks: 1
You granted user Joe the INDEX and REFERENCES privileges on the INVENTORY table. Which
statement did you use ?
Choose one answer.
a. GRANT ALL ON inventory TO joe;
b. GRANT ANY PRIVILEGE ON inventory TO joe;
c. GRANT ALL WITH GRANT OPTION ON inventory TO joe;
d. GRANT INDEX AND REFERENCES ON inventory TO joe;

88
Marks: 1
Examine the structures of the CURR_ORDER and LINE_ITEM tables : CURR_ORDER -------------------
ORDER_ID NUMBER(9) CUSTOMER_ID NUMBER(9) ORDER_DATE DATE SHIP_DATE DATE
LINE_ITEM --------------- LINE_ITEM _ID NUMBER(9) ORDER_ID NUMBER(9) PRODUCT_ID
NUMBER(9) QUANTITY NUMBER(5) The ORDER_ID column in the lINE_ITEM table has a FOREIGN
KEY constraint to the CURR_ORDER table. Which statement about these two tables is true ?
Choose one answer.
a. To update a record in the CURR_ORDER table, the parent record must already exist in the
LINE_ITEM table.
b. To remove the constraint from the LINE_ITEM table, you must delete all the records in the
CURR_ORDER table.
c. To delete a record from the LINE_ITEM table, you must delete the associated record in the
CURR_ORDER table.
d. To insert a record into the CURR_ORDER table, you must insert a record into the LINE_ITEM
table.
e. To delete a record from the CURR_ORDER table, you must delete any child records into the
LINE_ITEM table.
f. When a record is deleted from the LINE_ITEM table, the associated parent record in the
CURR_ORDER table is also deleted.

89
Marks: 1
You created a view that contains gropus of data, does NOT allow DML operations, and does not contain
a subquery. Which type of view did you create ?
Choose one answer.
a. complex
b. inline
c. simple
d. explicit

90
Marks: 1
Which statement about joining tables with a non-equijoin is true ?
Choose one answer.
a. The table being joined must NOT have any columns with the same name.
b. The number of join conditions required is always one less than the number of tables being joined.
c. A WHERE clause must specify a column in one table that directly corresponds to a column in the
second table.
d. No more than three tables can be joined using a non-equijoin.
e. The tables being joined must have primary and foreign keys defined.
f. The columns being joined must have compatible data type.


91
Marks: 1
Click the Exhibit(s) button to examine the data in the PRODUCT table. ID_NUMBER DESCRIPTION
MANUFACTURER_ID QUANTITY COST ------------------- --------------------- ------------------------------ ------------
--- -------- 215 AAA 6pk-battery NF10032 546 3.00 140 AA 2pk-battery EL7966 2000 603 D 2pk-battery
OT456 318 1.10 725 C 2pk-battery OT456 239 .75 218 AAA 6pk-battery OT456 980 3.15 220 AAA 8pk-
battery NF10032 4.20 126 AA 2pk-battery NF10032 2513 751 C 2pk-battery EL7968 84 1.00 You query
the databse with this SQL statement: SELECT description FROM product ORDER BY manufacturer_id,
quantity ASC What is the ID_NUMBER of the first value displayed ?
Choose one answer.
a. AA 2pk-battery
b. C 2pk-battery
c. D 2pk-battery
d. AAA 6pk-battery

92
Marks: 1
Click the Exhibit(s) button to examine the data from the AR_TRX_HY tables. AR_TRX TRX_ID
TRX_TYPE QUANTITY UNIT_PRICE EXT_AMT TAX_AMT ----------- --------------- --------------- ----------------
-- ------------- ------------- 1 D 10 100.00 1000.00 80.00 2 D 2 50.00 100.00 7.00 3 D 10 20.00 200.00 14.00
AR_TRX-HY TRX_ID TRX_TYPE QUANTITY UNIT_PRICE EXT_AMT TAX_AMT GRAND_TOTAL
LOAD_DATE ----------- --------------- --------------- ------------------ ------------- ------------- ---------------------- ---------
-------- 2 D 2 50.00 100.00 8.00 108.00 10-OCT-2001 You have been granted SELECT privileges on the
AR_TRX_HY tab;es and INSERT, UPDATE and SELECT privileges on the AR_TRX table. You execute
this statement : MERGE INTO ar_trx a USING ar_trx_hy h ON (a.trx_id = h.trx_id) WHEN MATCHED
THEN UPDATE SET a.quantity = h.quantity, a.unit_price = h.unit_price, a.ext_amt = h.ext_amt,
a.tax_amt = h.tax_amt WHEN NOT MATCHED THEN INSERT (trx_id, trx_type, quantity, unit_price,
ext_amt, tax_amt) VALUES(h.trx_id, h.trx_type, h.quantity, h.unit_price, h.ext_amt, h.tax_amt); What is
the result ?
Choose one answer.
a. One or more rows are updated in the AR_TRX table.
b. One or more rows are updated in the AR_TRX_HY table.
c. Rows are inserted into the AR_TRX_HY table.
d. An error occurs because there are no rows in the second table that are not in the first table.
e. Rows are inserted into the AR_TRX table.
f. An error occurs because there you do NOT have MERGE privileges on the AR_TRX table.

93
Marks: 1
You are creating the SALES table. This table should contain the SALE_DATE column and use the current
data if no date is providd when a record is inserted. Which line should you include in the CREATE TABLE
statement to accomplish this task?
Choose one answer.
a. sale_date DATE DEFAULT
b. sale_date DATE DEFAULT SYSDATE
c. sale_date DATE SYSDATE
d. sale_date DATE = (SELECT * FROM DUAL)
e. sale_date DATE = SYSDATE

94
Marks: 1
Which CREATE TABLE statement will fail ? (Choose aal that apply.)
Choose at least one answer.
a. CREATE TABLE datetime (time_id NUMBER(9));
b. CREATE TABLE $time (time_id NUMBER(9));
c. CREATE TABLE time *(time_id NUMBER(9));
d. CREATE TABLE date (time_idNUMBER(9));
e. CREATE TABLE time (time_idNUMBER(9));
f. CREATE TABLE time1 (time1 NUMBER(9));

95
Marks: 1
User Marilyn wants to elimated the need to type the full table name when querying the
TRANSACTION_HISTORY table existing in her schema. All other database users should use the schema
and full table name when referncing this table. Which statement should Mrilyn execute ?
Choose one answer.
a. CREATE PRIVATE SYNONYM trans_hist FOR Marilyn, transaction_history;
b. CREATE PUBLIC SYNONYM trans_hist FOR Marilyn;
c. CREATE PUBLIC trans_hist SYNONYM FOR Marilyn, transaction_history;
d. CREATE SYNONYM trans_hist FOR transaction_history;

96
Marks: 1
Click the Exhibit(s) button to examine the structure of the PO_DETAIL table. PO_NUM PO_LINE_ID
PRODUCT_ID QUANTITY UNIT_PRICE -------------- ----------------- -------------------- --------------- ----------------
--- 10052 1 1 100 10.30 10052 2 2 100 10.00 10054 1 1 50 72.10 10054 2 1 10 10.00 10054 3 3 10 10.00
Which statement will permanently remove all the data in, the indexes on, and the structure of the
PO_DETAIL table ?
Choose one answer.
a. DELETE TABLE po_detail;
b. DROP TABLE po_detail;
c. TRUNCATE TABLE po_detail;
d. ALTER TABLE po_detail SET UNUSED (po_num, po_line_id, product_id, quantity, unit_price);

97
Marks: 1
Which statement will user Barbara use to create a private synonym when referencing the EMPLOYEE
table exixting in user Chan?s schema ?
Choose one answer.
a. CREATE PUBLIC emp SYNONYM FROM chan.employee;
b. CREATE SYNONYM emp FROM chan.employee;
c. CREATE PRIVATE SYNONYM emp FROM chan.employee;
d. CREATE PUBLIC SYNONYM emp FROM chan.barbara;

98
Marks: 1
The ACCOUNT table contains these columns: ACCOUNT_ID NUMBER(12) NEW_BALANCE
NUMBER(7,2) PERV_BALANCE NUMBER(7,2) FINANCE_CHARGE NUMBER(7,2) These are the
desired result: 1.Display all accounts that have a new balance that is less than the previous balance.
2.Display all accounts that have a finance charge that is less than $25.00. 3.Include accounts that have
no finance charge. Evaluate this statement: SELECT account_id FROM account WHERE new_balance <
prev_balance AND NVL(finance_charge,0) < 25; What does the statement provide ?
Choose one answer.
a. none of the desired result
b. two of the desired result
c. one of the desired result
d. all of the desired result

99
Marks: 1
The STUDENT table contains these columns : STU_ID NUMBER(9) NOT NULL LAST_NAME
VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(25) NOT NULL DOB DATE STU_TYPEE_ID
VARCHAR2(1) NOT NULL ENROLL_DATE DATE You create another table, named PT_STUDENT, with
an identical structure. You want to insert all part-time students, who have a STU_TYPE_ID value of ?P?,
into the new table. You execute this INSERT statement : INSERT INTOpt_student (SELECT stu_id,
last_name, first_name, dbo, sysdate FROM student WHERE UPPER(stu_type_id) = ?P?); What is the
result of executing this INSERT statement ?
Choose one answer.
a. An error occurs because you CANNOT use a subquery in an INSERT staement.
b. An error occurs because the PT_STUDENT table already exists.
c. An error occurs because both the STU_TYPE_ID and ENROLL_DATE columns are NOT included in
the subquery select list.
d. An error occurs because the STU_TYPE_ID column is NOT included in the subquery select list.
e. All part-time students are inserted into PT_STUDENT table.
f. An error occurs because the INSERT statement does NOT contain a VALUE clause.

100
Marks: 1
Which three statements about a column true ? (Choose two)
Choose at least one answer.
a. You CANNOT specify the column?s position when adding a new column to a table.
b. You CANNOT decrease the width of a CHAR column.
c. You CANNOT increase the width of a VARCHAR2 column.
d. You CANNOT modify the data type of a column if the column contains non-null data.
e. You CANNOT rename a column.
f. You CANNOT convert a CHAR data type column to the VARCHAR2 data type.

Das könnte Ihnen auch gefallen