1 7tables
1 7tables
............ -..
Cat JJIIJ Cir
-.... .....
,I t\J I I \ 1-I I 11
VI [ll
(,. ()
l p• • l { 1' ')
I I (\ ) ( C.. J , ' I ' \ :) I,
t 2
l
\'il, ~lt\,tC'\' MlN("lty) frnm Shoppo
WUltRE City• "Mmuhl\t'';
t 1\I ~ J
1
f'.\ '"
1
1b
ti v~( (\·~t e;
2l. t,
3
Table · 2
2
Q , ObRcrvc the table given below (EMPLOYEE)
Write command of SQL for (J) to (vi) and output for (vii) to (viii).
C.W..w IJ1;rnu
1330
HA1,1r 11
fllilhry rlow I11,I11,y l,(JJ a, ,m, 14 01/AIH t I
l"O<iO l llf,ljO
r,1 A.r 11-:1 :,01 I Oli 0-i M HIMAYAI U/\C.,i.A,II
1331
rioooo Mooo ;.,01i, 10 11 F nrGllJMPr r
131:;>
PAWA1~
l.r!,00
Oll~Oil1 /0000 :?OHl 11 12 IA KUKArr l'IU V
1333
llOMt\
C,Ul">Tt. !iOOOO eoooo ,01110 1 F 111QI~ 11 C; CITY
1 '1 S<l
A.JI y
NAOl\rc
o~ooo oouoo 20Hl-01 20 IA 111MAYA I f//V AH
1331j
TI\NfAAV 67000
OIIATr 00000 ::>01G07 20 M ur C,lJMP I
13'30 HIVAMI 10000 00000
AH.Of<A 201104 1l
' IIIC.1 I II CITY
,, f t I t ~ I I
t I
4
fw1 TP
....dlaplaJ tlM - - • ol llae emploJ•• ba¥lq a date of Jot••••
tllaa3011
(·'IA, 1 00"j \
l /
_:::01 ~- c.\ d
6
Q3. Obaorvo tho t•blo glv.,,. below (llo• l'IIPI)
00
[~o Writ a
Namo
Sn11ctoop
111nuuu1 of SQL 101 (I) lo (Iv) 11h11 out 11111 r.-,. !vi " (viii),
Auo
G4 nopart,nu11t
1
r23 ~ 24
l3111uu1y llnlv.QLMfil f:lliUUll!I 011)(
:.! IAl.'ltl!I
t<orun 0 1lhOf)(ludii M
4 t'(l/111 fl.Ill
01t11opou11to
5 S111gory
1(1,\1}}\>:1
M
6 I NI 01/1>1/UH
I
7 IJ/llt/011
E.Nl M
8 i .i11l//t1U
n I El ___~9
Za~en 45 Caru1ology
9 ~ll/ll.'/\111 111~1
Kush 19 Gynlltlc:oluoy :l,VU,!/1111
1Q_ ;/0(1
Carlholcl\;JY
fil1a,1va~ -~ 3f Moctlci11n
1,11\11/tltl ll(Jll
M
111/tl,J[III •1011 I
{i) To list the names and nge of fomu1t1 pllt hmt I( who ltl'ti 111
orthopaedic department.
(ii) Increase the charges of male pat·ten t in ENT depart mcnt b y '311•"•
7
(HJ) Delete th t
e records or all female patJe.nu In Surie.ry departmtft
f II l '\i
!' I
9
(,lll , Oh!lio1v,\ tlio lril1lu ijlv, u l.oh,w jf-h111u1 ,d>H)
W, 1, 11 '-'Ullllllhll{I ~, fl(JI_; lot
(I) lo ('tll) 111,d out J"'t 1111 (v11) t 1> ( !'Hf).
.lW.U 111 Ult
!11 ~N1uu1
If I llUI•
llJ
tl1'1(! ,. 11,1..,11 ••• 110
l'11, tt
lhll,hO
j1AillDA.~.JIJSlllil~A.
j
14 1OIJ I (.M'l tj ,.,... ,,,,,.try
l'dl11ilfll1111u1I lti,hh Hof Ju,J,.11t1,11~r}1,
IUOIJ:A lttl 1r, Mt1'1lc ••• lf11r3a1JII
.Nobl1l1,1,t f.{l,l)(J
My~J11J,«1tl1t Jts,J,,u,l Guden,
I( IOU I
t,t, •~ 1r:o,tJo Mv.~b..w.ul1l
lJtillil
Hll>OIS ttc,.11 l lf>.O() Ul1UtiJW.iH101.M
HKl'))~J/IJfllY. H•mth
Kt1~JJ..,J2JJ,~Jhl
1(f I1 1 l, I"'''
I 1
\
tr
ri u· L - '
10
(iii)
JGourgaon
displat'.the Maximum price offered by pharmacy located
(iv)
To display ~he Drug I~, DrugName and Ph~rmacy Name of all
therecords 1n descending order of their price.
11
'" ,._. 1 wh lh1 l
LEC-T Phi a Na
Phu a Jh
11111111"~·
I i•h!• f:
QS, Obtiorv, ti"' lf1hlo gh1f'i11 hilto,v (filVMI
W, ito C1om111n1ul of fl(JI1 lur Ill In (lvl r.1111 lHil JIiii (111 IV} , o lvlfl)
lOOn1t INAMlC 1•acm10 HHANUNAMl'1 1
0 l Ol 2 0000 l'owo, U;yH1of!
E,ulle1l■ti1
0103
A11m, ll'lt 1800 Jloltul,Jc
ltxarnl•cn
0103
C101e Hlkn 14()00 If,, ot,jlc,
0104
!·w\ol_!t,r JUOIIO Cnttt:t11 •
Ext H ) ll16 Oym
0106 M6ii1U1[;~ flnli 6000
G106 Cro1u1 Trnh11 , 13000
(l) "I'0 dt sp Ifl}' tl lC TlfllllCfl n f n11 ti 10 It ,•mn wt Ill u1 11 .•1, ,11, eto,, ll with A,
\ I l r I
I I
uu,
To cJaaaa• tbe Brand.um.- to , t Tr dI d
ICOD& •• 0101
(fvJ
Add • new row for a
0107 Vibro x r
/' , r
I
vii) SELECT !NAME FROM GYM WHERE INAME LIKE "•t";
1 tlf. f\t
f ~ e ~C•oe \>r'V.
'.1(1\0f
("IO'l-
(/\10 5
~10&
G Ir\~
(n I :'l I
("lu'I
15
Q 'l'rt hl<' • t,
11
r, ht,"""• •• 1•hlo alvon holow (llllVl!'l,:S)
IVrlt• ~0111tnh11,I of S~l\, l01 (I) lo (Iv) ,11111 milt>ul for (v) lo (vlll).
l~,,, l' ll l NhmeJ
l ,, ' I I I
\ nov t,,,1
\I \111 ~:1 II· t, Snlnry HirlngDutc
111'
\ \1\11
\IP~I \N\ 11 HOOOO ~0 18 03- I 2
I I
l•'I I l'li'I ll H ll,
\N1 11111 \\ 1n~":, 1
fl.lt\t..' I IUt lK
82000
\) \ 0 I ' I 'l{l l
ltt~\\ \ h \I\ \N
\ Sll~
1~ \ l'l I 78000 20 15- 07-21
\)l'l l\ 1, ZI• Nl:il )0 1,
~ \ i\\ \ \ I~ \ I N \ \ ('Fl{
1)(. \.t,,, ~ll Ml l' R \ Ul~\\
l~l )l1
75000 20 19-08 -23
Zl•'t>t I\ l~US
lWOD 1' \ NM\\ ltl l \T IIP O~tFN 75000
\ )H ' lhl 'I \hi!~ 1,ll \ N 20 I 8-Ql) .20
'\ \
.'
\
\ \
(iii)
To display Name and Device of employees.
,,(\... ,(
0 VI( f> L Mf.:. \,
\f.?-\P. "{ ~P.l fl. p. 1),~ I< H< ...'\ 'f J Or 1 .;
17
(vl) SPLEC1' MAX(Snlluy) FROM DRVICJtS;
I'
[·I
II
( \ f (l
ft.1 ~P.-1 (~ ~
\ l
I '(~r()J..
{J: ,Yj ...,Pt I P. l 'I fi-1 I f,
11.,, ,r ().. I f p.
~r.. •(. I ff t l (1
~JI 'i.'T -; (\ I A!
18
Table - 7
Q7.0bserve (TABLE.7) the table given be!ow {WOR.Jvt"R
Write command of SQL for (i} to {iv) and o~t::~t fa: M ~ ~ :.U7.
Work end Name
001 Monika Arora
002 Niharika Sin haJ
003 V1Shal Si h
004 . Amrtabh Rao
1ooao
005 Vrvek Goenka
28000
006 . Vi ul Shah
45000
007 Satish Modi 62000
i. To create the table worker.
(/;.-r1f 'Tk:.,lf
I
1-kil(,- 1-
- o ·.:.- 1\.. , -C , " -
;:, -:. •
' ~
L -, '
ii. To insert a new tuple with the data (0OS. Gee thi.h, 'i 4 00t). llVr. E-
12-24, ADMIN).
Ill T .._,,.,, Ill• lht1I I all th• w tktt, ,r IIM ~ p,111 ♦nl
\ \ r-...
~11''1/\'
J\.._l ('" l\\'I
vii. SELECT Department FROM WORKER WHERE Name LIKE "\1% ";
0. \ l.'\h,_. ,\
\ 'r,..