GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Database  >  Sybase

 Print  |  
Question:  There are 2 tables, Employee and Department. There are few records in employee table, for which, the department is not assigned. The output of the query should contain all th employees names and their corresponding departments, if the department is assigned otherwise employee names and null value in the place department name. What is the query?



July 07, 2006 00:03:31 #5
 Himu   Member Since: Visitor    Total Comments: N/A 

RE: There are 2 tables, Employee and Department. There...
 

select e.ename,d.dname

from employee e,department d

where e.eid=d.eid(+);

     

 

Back To Question