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

Assignment Help:

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


Related Discussions:- Search the name department number and salary of employees

Name the metrics for selecting top algorithm, Name the metrics for selectin...

Name the metrics for selecting top algorithm There are a number of metrics for selecting top algorithm: i) Computational complexity: Computational complexity refers to eff

What is nested trigger, What is Nested Trigger? A trigger can also havi...

What is Nested Trigger? A trigger can also having INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause ano

Optimistic concurrency control, Optimistic Concurrency Control Is locki...

Optimistic Concurrency Control Is locking the only way to stop concurrency related problems? There exist some other ways too. One such way is known as an Optimistic Concurrency

Design of a database, Ask questioYou are the database administrator in a un...

Ask questioYou are the database administrator in a university. You have been tasked to come up with a new database for the University. Using the stages in Database Life Cycle come

What is difference between truncate and delete, What is difference between ...

What is difference between TRUNCATE and DELETE? - Truncate can't be rolled back whereas Delete can be. - Truncate keeps the lock on table whereas Delete keeps the lock on ea

Creating views with check option-data control, Creating views with check op...

Creating views with check option : This option limits those updates of data values that cause records to go off the view. The following instance tells this in more detail: Examp

The second normal form (2nf), The Second Normal Form (2NF) Definition: ...

The Second Normal Form (2NF) Definition: A relation is in 2NF if it is in 1NF and each non-key attribute is fully dependent on each candidate key of the relation. Some of th

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd