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
What is the difference between SQL Server 2000 clustered and nonclustered indexes? With a clustered index, the data are kept in the bottom level of the index and in the similar

Write short note on Events Events consist of inputs, interrupts, decisions and actions performed by any external device or users. Every event always has a sender and receiver.

For each m:n relationship type R, we make a new table (say S) to represent R. We also contain the primary key attributes of both the participating entity types as a foreign key att

What are stored and derived attributes? Stored attributes: The attributes keeps in a data base are known as stored attributes. Derived attributes: The attributes that are de

If one requires to access data using Logical Database , the use of events is unavoidable. Yes, if someone wants to access data using Logical database then the use of events

System Design: An Object Oriented Approach Any software systems always try to change and evolve as technology and business rules evolve. The development of information systems

What is the use of sub queries? A sub query is a select-from-where expression that is nested with in another query. A common use of sub queries is to do tests for set membershi

What is the difference between internal tables and extract datasets? The lines of an internal table always have the similar structure. By using extract datasets, you can ha

Distributed And Client Server Databases Introduction This unit tells the distributed database systems which are primarily relational and one important execution model: the

(a) Explain briefly the three parts of a relational Model. (b) Contrast the following terms with an appropriate example: (i) stored attribute v/s derived attribute (ii) en