|
INTERVIEW QUESTIONS
DATABASE
SYBASE
DETAILS
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?
Answer: Use an ouer join to get your query.
Select E.ENAME, D.DNAME
from Employee E, Dept D
where D.DEPTNO (+)= E.DEPTNO
|
|
|
Category |
Sybase Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9860 users |
Added on |
8/12/2011 |
Views |
71423 |
Rate it! |
|
|
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?
Answer:
Use an ouer join to get your query.
Select E.ENAME, D.DNAME
from Employee E, Dept D
where D.DEPTNO (+)= E.DEPTNO
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is a transforamation?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Sybase Interview Questions & Answers - Exam Mode /
Learning Mode
|