0% found this document useful (0 votes)
12 views

DBMS Module4

Database Management Numerical and Solution

Uploaded by

kebef22988
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
12 views

DBMS Module4

Database Management Numerical and Solution

Uploaded by

kebef22988
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 78
«CI __ehsswate | 0) = Br gas By. = Btnackund Geng any @. Overview St SQL: ; 7 5 ies SQL is 5 a database Gm iter, longus E dealgord for the retrieval ee en alata in - pslaleagee database. a \, tees @n ya ca ea = foo 4) SQL notnieve ol. m2 database . | 2) SQL an HEN pecords io a ge SQL Can. % te records ia la [fa | 4) Sal can a mos dilabase « et S) SRL Can et _peamissian on. e SQL consists GQ Following lang usges i |) Data Defini Hen Lan DBO” ii) Data Manipulatian la luoge (DML). Lin Daa Gnbool language © Gntija A Scanned with CamScanner ‘Scanned with CamScanner eS! Ta add ia column. :- pyle alten table Tabename aid (oles whan ditryeCaiay), & alk2 the shdent add goede intl), ns Adal sms liple “columns: Valker table student add email isl varchah ada depliame vabehar (22) , ? Tevadd Glumn «at the Fipsts i se aller table student add branch mame ow Anak, , pits To eects Sia a "tle ad cach, sea nd Gatco “Tach sy otaoe Pe ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner SN [ey allen tah. atydoat aller cota i F Sname_ sot default ons kat ee te die O {Damping defau tt spit ware alten table Gt sent aa = pe colwnanntaneealisp ale ee ee spb] Check Constnaiak = Lo | syntaou = te columnname £ __ Li [- create table tablename C dataty pe(size),—Glamnrame 2 délatyye Giz), dataty pe(aize), chetk Céondlition)), | colusmnname 3 nile Table. Shudent GA int), age int Cis) smarks iot(g), cheek Cage Le) 5- (| insert iodo student toalcurs tae. O, 85) 5. Recoha inertel trodes Lp (2) insert jot Shuclant tlie lostss 275. = | chosk et elif Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ene aaa tela a Serta CAephl pag ~~ Linsext lato student Saas Tet eu ie ano | record adder Succes eee = finsent inte Sbidend Co TUabhiba 8h, 40), ‘recodd doetyy ag Aepttd to ke wor poset ete ae: . O Aner crea ghee ArLAn Fey Can a added <4 follows :- J J ail studeot edd coustnaint fk L | fous oy (depth) Fulah tet depasieat al = deac Shilen | a mul {adere £8 tare dyatrfore al ate =n yen taille Sholect ab alan = yan oe ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner z Logical yas — | _Nok,And, 0 OA operstors Lopenators- These thre opersto, are lesical cae cones a we ah este a ee ie ator. tits | ions ‘ eo opehatrr axe pehatrr Belen, Q dowd oe ae chi Hens Ligh are dre. xe if Onditicn 2a false. Comsider Poli thu. id avi mame ci Gea ( fe Sharma om 5000 2 Mehta, pune __loooe Pakil Wooo 3 4, ol Sharma 2000 S) i [svoo | 6 ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner “ (rupley tmp having gat a4 null @) A > Seek fom ome where Sal i% mull. ~O—piey onp voving, so. wet nal ~ 5 slut * from emp woltere cal je vot null: He Ge two gelec & Set ofenat oft - get openators combing the hes! stitimen tg into a single atatirment Gable), Quonies tating gek openstons ane Called Compound guste: ~ The seb operators are a ) Union /union all 1) intendee - ‘ili) Minus ~ Rules ~ 2) Fach geleet ctatiment must have game no- A @lumue 4A wrth Same, data tpe. é 2) Fhe Glums should be ‘aaah olde. tn solect atgliment Scanned with CamScanner ‘Scanned with CamScanner Osdat cit css From wut Wane ol>= 2 @ i Dlon sebeet aud, Crane fom ang Wiens, adr=3 Totinseat ete abe. ee (0 (y) b arias vail! be Fable 2. nelaShoel : Be GW chet cname frm cust « intersect gelect erame from emp 5 Heel Aci (2) seeet ewan curt iptisecet eelect tla cme, ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner Bien i } \yraay neha _\\ooee 2 |ASAY 5060 3 \SANTAY shatma 7000 | 4 [raves |pakel |200° i [wokest | Patil | out j emp Table: © OWrik an Qu quay ph det Hrabuane ae i op ‘io amall letters and Lostvane 19 a lebleas - > golect upp et (lame), {ower Gears) Rech emp, ane gal ot upped (lust) [tres (frame ) a Oe ee a Mebba MEHTA Yi") I aie SHARMA] _ ous AE Sseomemletcd < makesh @ Find sition G a in Fashuane. ) ° _> select inste (fame, ‘') dom emp @ é oe rasts Chaat, a’) Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ee e a frame [Mame | gat: Deplea a iret kalenfcoes ele * vije4 [sharma [1000 - | tamesh atil |6o00 |sale Jrmbesh|fatel Hoo 0} emp. tab o ajay |Bkave [joo pm . mano} BER i5 000] 46° namod | Patil dull [HR n mull | oul Sais (Ch ee amp byes Query 4:- Find avedage Ss » —— celal a a(sat) from ome Quenye:- Find avy. $a Othe. ernpleg eet accopdian ty the, See age quid iy Note Givep by clauise was added to Spl because Aj gle ~~ pptubns de G tthe clung, Hf wre want Hind out calculation Nea wise, ib is wet possitl, sith iam Fanchoins Hua oie Ser 4 alate As ‘Scanned with CamScanner ‘Scanned with CamScanner ~ WP x me Display pitt slary Chthe employers accating 4 ise cli eag Sed ole seloes 3g guste. tein e 0,009" bE dane F eee A gulre 3 ® ait beame| genial) sam(sel) ‘an dn 5 sia | ows gry by clpbvame ; ace 24 008 havin gum (cal) 7 [o000; @ a Onde by Clare fe , jig used gost fhe Awelt Onder My clase 9 Tt ete result in aseendi yale . Selick MUimnane(s) hom tablename where Gudlibin orsles by Glumnnant ase [desc ; " Ei i od es oh - Solve Glumnvme, “ny nade (har vamne ps \ [pblarane. wht Couditunu gomy ee londitioun olde by Glummane 9c flac, 4 ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner ‘Scanned with CamScanner he gon Tidy Boa sperial “Gy Pe O stoned i fitcedane! that automatialy enecitig hen a9 eae mediBe 9 Hac DB. Tt ences if lets Hrroush a DML. Syritix Eragon (For aia Create ty; : trata Pe QQ vame ope time Dhen a user tues to 4 le. statement) on trblivame rv each bovd truer _ statement, Where, trigen name = name & the tigger trhjo Hime = Before op. atten trbje event = insert, update or delete, bugga Sbitem ent i ngs stab ment SynGx Pow maltiole sbitiments my sqte7 dle limitix. i/ sah > Cheat. trigra trisne mame dre etime THA. evegt On DhlLewne. £3 each aos Berio an gtytemente ; end; / moasrle > elimi; Scanned with CamScanner (2) Def ) . ston g FReger ty updeti_a sepanse TA anne. 2] Value in employer fable, Heat Seca! insented . | Pasine ~ @mp_ insert 7 ” 7 bk amp tareat 2) : * a Tage insert attempt alli. insert on : p 4 emp Ph Ach ww an ert into emp-asext Set feame= nes Fane , 5 Sal = new. sab; 4 4) Select © 4am erp_-ntest 3 /Jemp' set 4 2) tasert inh emp valuss (2,'?, 4! swe); + +. 4) galet * fam emp- iasat, - Scanned with CamScanner vane foe | a bo Stud gpd © Aenea table shut! © Y creati Table sholL. » dO alelimiter / ’ gtual > cheate shed shudeinsert afta. insat en ; hr each vow beqin . eres: insert igto stud wet viqmes nes 1aMe , ner “taal ; dle from shld where make

You might also like