Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Oracle Certified Professional Exams (OCP & OCA) >> Question about join (Q32 In Tk) 1Z0-007

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Question about join (Q32 In Tk) 1Z0-007
 ozkucur  Posted: Nov 05, 2006 12:15:00 PM

 Total Post: 23
 Joined: Oct, 2006






 Here is the question Q32 from Testking v14.0 for 1Z0-007

Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS
tables.

EMPLOYEES

EMPLOYEE_ID NUMBER NOT NULL, Primary Key
EMP_NAME VARCHAR2 (30)
JOB_ID VARCHAR2 (20)
SALARY NUMBER
MGR_ID NUMBER References EMPLOYEE_ID column
DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the
DEPARTMENTS table

DEPARTMENTS

DEPARTMENT_ID NUMBER NOT NULL, Primary Key
DEPARTMENT_NAME VARCHAR2
(30)
MGR_ID NUMBER References NGR_ID column of the
EMPLOYEES table
LOCATION_ID NUMBER Foreign key to LOCATION_ID column of the
LOCATIONS table

LOCATIONS
LOCATION_ID NUMBER NOT NULL, Primary Key
CITY VARCHAR2 |30)
Which two SQL statements produce the name, department name, and the city of all the
employees who earn more then 10000? (Choose two)

A)SELECT emp_name, department_name, city
FROM employees e
JOIN departments d
USING (department_id)
JOIN locations 1
USING (location_id)
WHERE salary > 10000;
B)SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
JOIN ON (e.department_id = d.department id)
AND (d.location_id =1.location_id)
AND salary > 10000;
C)SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
WHERE salary > 10000;
D)SELECT emp_name, department_name, city
FROM employees e, departments d, locations 1
WHERE e.department_id = d.department_id
AND d.location_id = 1.location_id
AND salary > 10000;
E)SELECT emp_name, department_name, city
FROM employees e
NATURAL JOIN departments, locations
WHERE salary > 10000;

ANSWER: The TK says B, D
IMO A,D

What do you think?

 snehalatha
Posted: Nov 06, 2006 01:02:04 AM  

 Total Post: 169
 Joined: Apr, 2006






 
B&D is correct

Please try the A Option. it gives the error

 ozkucur
Posted: Nov 07, 2006 04:35:42 AM  

 Total Post: 23
 Joined: Oct, 2006






 
Hi snehalatha, thanks for your answer.

Weird, I have copied the statement at A into my SQL*PLUS (HR schema) and changed the emp_name -> to last_name. and it worked.

But the statement at B, gives an error at the join statement. It says invalid table name for the join clause. I think, it is a wrong usage of JOIN ON statement.

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar814
  Mohammed Taj694
  Jayanta Sur479
  Vigyan Kaushik386
  positive fanatic361
  Gitesh Trivedi322
  Gopu Gopi242
  neeraj sharma228
  Ramesh Jois226
  snehalatha p169






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software