Sql select employee from table with at least one department, Database Management System

Consider employee (e_no, e_name, e_salary, d_code), dept
(d_code, d_name) and dependent (depndt_name, e_no, relation).
Show the names of employees in purchase and accounts departments with at least one dependent.

SELECT e_name FROM employee, dependent, dept
WHERE employee.d_code=dept.d_code
AND employee.e_no=dependant.e_no
AND d_name IN (‘ACCOUNTS', ‘PURCHASE')
GROUP BY e_name
HAVING COUNT (e_no)>=1

Posted Date: 5/11/2013 2:41:03 AM | Location : United States







Related Discussions:- Sql select employee from table with at least one department, Assignment Help, Ask Question on Sql select employee from table with at least one department, Get Answer, Expert's Help, Sql select employee from table with at least one department Discussions

Write discussion on Sql select employee from table with at least one department
Your posts are moderated
Related Questions
Research Value: 7% Due Date: 17-Sep-2018 Return Date: 11-Oct-2018 Length: 700 words Submission method options: Alternative submission method Task back to top You are required to

What is the State Machine Engine The straightest approach to implement control is to have any way of explicitly representing and executing state machines. With the help of thi

Q.   With the help of a suitable diagram gives module wise explanation of system architecture of DBMS. Sol. A Database management is a collection of interrelated data and col


Your friend owns a computer store in Yuen Long, selling Desktop and Notebook PCs and other computer peripherals. Having been rather successful with his business there, he decided t

Which data type can store unstructured data? Raw data type can store unstructured data.

What is meant by functional dependencies? Consider a relation schema R and α C R and β C R. The functional dependency α ->β  holds on relational schema R if in any legal relati

1.Why we need data mining? Give an example to illustrate your answer. 2. Why data mining is considered as "misleading name"? 3. Distinguish the difference between database an

Draw an entity relationship diagram (ERD) for the following situation: A company has a number of employees. Each employee is identified by an Employee_Id. The company wants to st

What are the problems if one were not to normalize?  When do these problems surface?           Ans:  Database normalization, sometimes considered to as  canonical synthesis, is