Employee and Department

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

EMPLOYEE And DEPARTMENT

The following exercises are based on the tables EMP, and DEPT, the structure for which are given below: EMP: EMP_NO
NOT NULL NUMBER (4) (Primary Key)

ENAME

DESIGNATI JOIN_DATE SALARY ON


NUMBER (#$ % NUMBER (#$ %)

DEPT_NO
NOT NULL NUMBER (%) (&'rei(n Key )'r De*+ Ta,-e)

AR!"AR (4) DATE

DEPT: DEPT_NO
NOT NULL NUMBER (%) (Primary Key)

DNAME
AR!"AR (%.)

BUDGET
NUMBER (/.$ %)

MANAGER
AR!"AR (%.)

Populate the Below Data in the tables:

EMP TABLE
EMP_NO ENAME 1 Ravi " !)bi*a + Revathi # !ishwar-a ( 0as)in , 1ithia 2 Deepa & Rathi DESIGNATION ! ! ! ! ./ ! ! T/ ! ! ./ JOIN_DATE SALARY DEPT_NO "#$%&$"%%' 1(%%% 1&$11$"%1" &%%% %($%,$"%1% 1&%%% %&$%"$"%%" #&%%% 1#$"$"%1" '%%% ""$%#$"%%& "(%%% 12$%,$"%11 1%%%% %"$%#$"%%1 (%%%% #% #1 #% #+ #1 #" #1 #+

DEPT TABLE
DEPT_NO DNAME BUDGET #% erver !nal-st #1 !ssistant erver !nal-st #" Tea) /ead #+ .roup /ead MANAGER "%%%% 3u)ar 1"%%% 3avitha "&%%% Parvesh #%%%% ubasree

4se the above tables to for)ulate 5/ 6ueries for the following : DML:
17 Displa- the e)plo-ees na)es 8oined after "%117 "7 Displa- e)plo-ees earning )ore than Rs7(,%%%7 /abel the colu)n na)e 9E)plo-ee:7 +7 Displa- e)plo-ees who are neither ! ! nor !7 #7 Displa- all e)plo-ee na)es and e)plo-ee nu)bers in the alphabetical order of na)es7 (7 Displa- all e)plo-ee na)es containing the letter 9 :, an-where7 ,7 Displa- the na)es and 8obs of e)plo-ees whose salar- is greater than Rs71%,%%%$; in 9Training: Depart)ent7 27 Displa- the )ini)u) and )axi)u) salar-7 &7 Displa- the list of e)plo-ees along with their depart)ent na)e and its )anager7 '7 4pdate the !/!R0 colu)n in EMP so that all e)plo-ees in depart)ent "% get a raise of Rs7(%%7 1%7 Delete an- record fro) EMP table where salar- <+%%%%

DDL:
17 !dd a new colu)n na)ed P=>?E to the EMP table, with a data t-pe of nu)ber and length #7 "7 @ncrease the siAe of P=>?E colu)n to ,7 +7 Drop the EMP table7

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy