Search the name department number and salary of employees , Database Management System

Example: Search the name, department number and salary of employees drawing minimum salary in that department.

SELECT ENAME, SAL, DEPTNO

 FROM EMP

WHERE SAL IN (SELECT MIN (SAL)

                          FROM EMP

                         GROUP BY DEPTNO);

 

EMPNO

ENAME

JOB

SAL

DEPTNO

7566

Nirmal

MANAGER

2975

10

7788

Kailash

ANALYST

3000

10

7839

Karuna

PRESIDENT

5000

20

7902

Ashwin

ANALYST

3000

20

7905

Ashwini

MANAGER

4000

20

 

ENAME

SAL

DEPTNO

Nirmal

2975

10

Ashwin

3000

20

 

 

OUTPUT:                                                               

Search the salary of employees employed as an ANALYST

SELECT SAL FROM EMPWHERE JOB= ' ANALYST '

OUTPUT:

70_Search the name department number and salary of employees.png

Posted Date: 3/11/2013 3:47:32 AM | Location : United States







Related Discussions:- Search the name department number and salary of employees , Assignment Help, Ask Question on Search the name department number and salary of employees , Get Answer, Expert's Help, Search the name department number and salary of employees Discussions

Write discussion on Search the name department number and salary of employees
Your posts are moderated
Related Questions
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

Authorisation Authorisation is the culmination of the administrative policies of the organisation.  As the name shows, authorisation is a set of rules that can be used to verif

What is Message switching Message switching transmits data units which can be arbitrarily long. Packet switching has a utmost packet size, if any message longer than that, it s

Project Description: Oracle Certified Professional with 20 years of practice, Oracle version 6.0.34, 7.3, 8.0, 8i, 9i, 10G, 11G, 12C. Crossplatform migration, Informix, MSSql

Events4Fun is an event management company in Europe with branches in South America as well. The company is well-known for its efficiency, good-quality services, and affordable char

A Functional dependency is described by X Y between two groups of attributes Y and X that are subsets of R specifies a constraint on the possible tuple that can make a relation

Horizontal Fragmentation- Horizontal fragmentation groups together the tuples in a relation that are collectively used by the main transactions. A horizontal fragment is produced b

How to create values of structured type? Constructor functions are used to make values of structured types. A function with the similar name as a structured type is a construct

Which two files are used during operation of the DBMS? Data dictionary and transaction log are two files used during operation of the DBMS.

Add generation capabilities and/or tailor the built-in functionality of generator. This enables you to produce "all" the test data for the MySQL tables you produced in the previous