AllExam Dumps

DUMPS, FREE DUMPS, VCP5 DUMPS| VMWARE DUMPS, VCP DUMPS, VCP4 DUMPS, VCAP DUMPS, VCDX DUMPS, CISCO DUMPS, CCNA, CCNA DUMPS, CCNP DUMPS, CCIE DUMPS, ITIL, EXIN DUMPS,


READ Free Dumps For Oracle- 1z0-007





Question ID 7850

Examine the data from the ORDERS and CUSTOMERS table.

ORDERS

ORD_ID ORD_DATE CUST_ID ORD_TOTAL

100 12-JAN-2000 15 10000

09-MAR-

101 40 8000

 09-MAR-

102 35 12500

15-MAR-

103 15 12000 104 25-JUN-2000 15 6000

105 18-JUL-2000 20 5000

106 18-JUL-2000 35 7000

107 21-JUL-2000 20 6500

04-AUG-

108 10 8000

CUSTOMERS

CUST_ID CUST_NAME CITY

10 Smith Los Angeles

15 Bob San Francisco

20 Martin Chicago

25 Mary New York

30 Rina Chicago

35 Smith New York 40 Linda New York

Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed on the same day that Martin places his orders?

Option A

SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Mating' AND ord _ date IN ('18-JUL-2000','21-JUL-2000');

Option B

SELECT ord_id, cust_id, ord_total FROM orders Where ord_date IN (SELECT ord_date FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'MARTIN'));

Option C

SELECT ord_id, cust_id, ord_total FROM orders Where ord_date IN (SELECT ord_date FROM orders, customers Where cust _ name = 'Martin');

Option D

SELECT ord_id, cust_id, ord_total FROM orders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust name = 'Martin');

Correct Answer B
Explanation Explanation/Reference: Explanation: This query will return the order ID, customer ID, and order total for the orders that are placed on the same day that Martin places his orders. Incorrect Answers A: This query returns only Martin's orders for July 18, 2000 and July 21, 2002, not orders of others that were placed on the same day that Martin placed his orders. C: This query uses incorrect sub-query to extract dates when Martin placed his orders. D: This query will return only Martin's orders. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 145-156 Chapter 4: Subqueries


Question ID 7851

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?

Option A

ALTER TABLE students ADD PRIMARY KEY student_id;

Option B

ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id); 

Option C

ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student _ id);

Option D

ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

Option E

ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

Correct Answer D
Explanation Explanation/Reference: Explanation: This statement provides correct syntax to add a primary key on the STUDENT_ID column of the STUDENT table. Incorrect Answers A: This ALTER TABLE statement is missing CONSTRAINT keyword and the name of the constraint. B: This ALTER TABLE statement is missing the name of the constraint. C: It's incorrect syntax in the ALTER TABLE command: STUDENT_ID must be used with brackets. E: We need to add constraint, not to modify existing one. Usage of the MODIFY keyword is incorrect in this case. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 239-240 Chapter 5: Creating Oracle Database Objects

Send email to admin@getfreedumps for new dumps request!!!