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 meant by Physical blocks? The input and output operations are completed in block units. The blocks residing on the disk are referred to as physical blocks.

3NF Normal Form A relation schema R is in 3NF if it is in 2NF and for each FD X A either of the following is true X is a Super-key of R. A is a prime attribute of R

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


Explain the utilities which help the DBA to manage the database? Every DBA uses database utilities to maintain and control their databases. But there is a lot of confusion wit

Define the Immediate Update The immediate update methods may apply changes to the database on disk before the transaction arrives a successful conclusion. Though, these change

What is transaction? Transaction is a unit of program implementation that accesses and possibly updated several data items.

Describe the two types of methods for retrieving rows in Python? Fetchone()- Returns the next row as a sequence Fetch all()- Returns the entire result set like a strin

What is a state chart diagram? State diagrams (State Chart Diagram) explain all possible states that a particular object can get into, and how object's state changes as result

construct a b-tree for the following set of key values 2,3,5,7,11,17,19,23,29,31.assume that the tree is initial empty and the values are added in ascending order