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

Assignment Help:

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


Related Discussions:- Sql select employee from table with at least one department

FIELDS, 4. Describe three ways to handle missing field values

4. Describe three ways to handle missing field values

MYSQL, i have a homework assignment identical to one you have listed

i have a homework assignment identical to one you have listed

Increased overheads on update-data replication, Increased overheads on upda...

Increased overheads on update : On the drawbacks side, it will need the system to ensure that all replicas of a relation are consistent. This shows that all the replicas of the rel

Managing database, 10A.53 Code an Oracle Database trigger to enforce the ...

10A.53 Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department. 10A.54 Code an Oracle Database trigger to allow the

Microeconomic, anyone have a textbook solutions case fair, 8 edition of vo...

anyone have a textbook solutions case fair, 8 edition of vol 1 ?, please give me

Selective replication-data replication, Selective replication: This is a c...

Selective replication: This is a combination of generating small fragments of relation and replicating them rather than a entire relation. The data should be fragmented on require

Participation constraints, The participation Constraints shows whether the ...

The participation Constraints shows whether the existence of an entity depends on its being associated to another entity by the relationship type. There are two kinds of participat

What do you understand by raid, What do you understand by RAID? Explain RA...

What do you understand by RAID? Explain RAID Level 4 and Level5? RAID - It is stands for Redundant Array of Inexpensive Disks (as named by the inventor), or alternatively Re

Explain the lock based protocol, Lock Based Protocol A lock is nothing ...

Lock Based Protocol A lock is nothing but a mechanism that tells the DBMS whether a particular data item is being used by any transaction for read/write purpose. As there are t

Improve efficiency in query evaluation, Question: AirwaysCentre, an int...

Question: AirwaysCentre, an international airline booking company currently uses a relational database system for their operations, which includes the following relations: P

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd