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
CREATE YOUR DATABASE TABLES Your database project must have a minimum of four tables. Include the SQL scripts used to create the tables in your documentation. Explain the tables

let us consider a table having 2200 records and the fixed size of the table to be considered as 25.then how many numbers of table is requredto perform horizontal fragmentation

(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

Prepare Heart Failure Registry database How are you today? Please I would like you to design a Heart Failure registry where doctors will log in to enter information about their

Briefly explain each of the following database terms. Use no more than 2-3 lines for each term. 1. DBMS 2. Update Anomaly 3. Alias (referring to tables in SQL queries)

What is foreign key? A relation schema r1 derived from an ER schema may contain among its attributes the primary key of another relation schema r2.this attribute is known as a

Define Serializable schedule Serializable schedule: An interleaved schedule of much more than one transaction is known as a serializable schedule, if it is equal to some serial

Removing a Synonym: DROP SYNONYM D30;

Write short notes on relational model   The  relational  model  uses a  collection of  tables  to show  both data  and the relationships between those  data.  The relational mo

average response time?