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 a database? Database - Basically in simple terms A database is a collection of inter related data and/or information stored so which it is available to several users

Explain several types of constraints that can be specified using CREATE TABLE command. Explain CASCADE and RESTRICT clauses of DROP SCHEMA command? Constraint Description PRIM

Q.  What is relational algebra and calculus? Explain the relational algebra operators :- Selection and predicate, set operation, joins and division. Sol. Relational Algebra

Example - ALTER TABLE emp MODIFY (empno NUMBER (7));

The State of Newyork certifies firefighters throughout state keep track all of them, as well as the state’s of fire departments. Each fire department has unique department number

Explain the Fundamental concepts of object-orientation Software developers, data base administrators (DBAs) need to be familiar with fundamental concepts of object-orientation.

Define the phases of two phase locking protocol Growing phase: a transaction may get locks but not release any lock. Shrinking phase: a transaction might be release locks bu

need a DBMS system on any data for assignment.

For each 1: n relationship type R involving two entities E1 and E2, we recognize the entity type (say E1) at the n-side of the relationship type R and contain primary key of the en

Benefits: It limits data access. It makes difficult queries look easy. It permits data independence. It presents dissimilar views of the similar data.