0% found this document useful (0 votes)
49 views6 pages

Practical 5

Oop second year

Uploaded by

Durva Yerunkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
49 views6 pages

Practical 5

Oop second year

Uploaded by

Durva Yerunkar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
620% FATTO MULUN | I —— . yt | — EASE se Sifradicos elt oe ual. Jade ) cea fale Eon Gliang ed {Emp (fmp_na_, £ name: Dept at cine Tob_id_, Solloary , — tired) create _™mace Limp © | Eine po-rivd wesdss : b LE mame* varchar (so), 2 sob e eon ys _Depl-mo sink 2 Dept name vartlay (20) Fob tds tuk occ 2 d |Salory ink : wad yng * snaaz oe | Wiredats date” s Sele? vatits ); A fice mule ows in Hae above table. Ermp_uaing ingt___TNSERT command of SQL =| weer into_£mp : vewes UN, ‘berlin’ 10’ heist? ase" *¥Pooo * ‘ot-04 2001, ('2"" professor’ "tt", "ama: "fuse corm! Sol-o4-aovi) [Cat taiot “iat fit? Muse’ Wooo! ‘ot ou- pont") » ita geet — | eorite Hae ou puts le) Trsert into mp2 (Snp-7a_Enane_DephsoDephinme Sebi. Sey. Wired ato) i Vaben nGet ‘Shreyas.’ too, Salem, 1-1, 4000 d 128 -04 ~ao1¥" be error Sd i.ishadd be wollen tn!” isaedte is | angie Date. Page__I8__ aoe dodabype we LL DDehete mp whore € nainy = Shreyor > DELETE FROM Emp WHERE: Ff nang =" She Out pub esa abe — Bows affected : | 0 Update nln = 50000 hore —deph na pdusion error: ex not have datalype vacrhare So it will ot updabe data- ID Sceckt * From urhore any = >= 25000. a ee = 4o080 r> seuect * Feom Emp woneee _Salony >= 25000 _ AND Sodany 60000 Result: ‘Hl Analy oe. Hea differénce behoedn sdaeg ‘6. did al oe elele ste in| | Be vemoves some or all |O.D sremoves “edhe scum, tho doplén Srom_atablen [table domain. or consteoi nts. 620%~ FATIOR rutLA Date 13, N Page 19) io | fom the database pike o _@ Bala:_tauipulion Language ® Dato Definition. Lorguage — | Command «1 “| eommand + Adu‘on rr for S peLeTe @ Achions + t DROP. | com be aplted- hack axe! cont be aplled~ back ik user) bulter | becouse ijt directly -works_on adtwab- data i» i table |_toble im the mmony s_| Gam amor si 9 not freed even if you delle alls Hi ope 2 | dhs dable - usivig peLete.! : 2) and) © Shortage of iemnony is_1O: Memon)” mmoin' issue! ne | main trtssben o!* thet A abet S pate B7@7aT Page_20___ | ds J Hous - to delofe maultiple records ? Firstly spedfy the fable name whore you _waut fo ‘remove dake in» ta pevere' eeom _awre Second, you jesk__a__condition im __#he —wotlere clare pei which rows 4» _xemove Th cami: Ye wonere . lauwe, tha statement will nemove all -mours vin dhe table 2 __ by, Meoukion .-TRuf (FALSE Fuiti fy T ABler ‘doop table’ tho shrttice of tho _dahabase ° semain same." -=3| faleo. ‘AHer ‘dap table’ the table _is__ deb etid oot ie Fil" shucivee see S oe yi ele i} Cocotte a table eripvoyee - witti fallessing. ~_ schema: Emp (fmp_no, £ name, Doph ro_Dept snide” Job id Sal any hired ate) Worle i SQL -qperion - So fellosiug fora: a) Trsert ak least youre in tte t> INSERT INTO Emp. VALUES Ss” f 315, * BAe “a aie 1o_.' predudlion', 145¢+ ao000 “ol ~ou-ago! ie pele ‘emdudtion’ 1463 rppDe .1- os-agoI") (3, i! py wed! “INS. URSOD “alls 02 ~ R005") (a ae 1B ae IWsa_, 0000," 93 ~o4~ 2008"), (5S, ‘stockholm’ 14 ‘sales’ 1460 Yoooo "11- N= 2909"), P Display — fe sprect_* Fkom _£mp y 7 620y- RTI mULLA 9 Display ths information i i w07 department's PRopucrion and sodeny ‘above 40000 T> serecr * Rom &mp jes ar enh WHERE’ Dept name = ' prmduction' ’ anh” Salocry?> 40000 S) Updeka tee” salary’ of “employssn ~ sto’ 30000 bi pe Raay "of emp in department sales p01! ‘ oe) > Ui + ET _Sc = 30000 WHERE Dept iname' sabes yrsdivecorbet _yenbensih bya wad ay -* ot 1s S 2) Deleto SL working in hoviv below 10000 ss. ts DELETE FRom Limp Add Ay WHERE Sobany 2. 1000026 + we'oah ae. if) fay Hol sda ng wig $ ims! SALES Deporrl mrewk iat act ( Cs seeer * prom Emp WHERE 0: mos sales”. oo Emp (emer empname sean fino) uw Dept deplne “dephiane sjob tid) - 6) Taser Sows in a tho “tables ~ b> Trsert iwho fie vawes (1, ‘berlin’, 45000, gescy i23ys) (2, ‘tokyo’, yoo, 3383165243) (3, 'ri0! , Yoo _,_ 81235 66932) 9/2) Fon mut CEO te ‘ —shaoya 340m. 7.6541 32293') noimnbi! Woop 9822546999); Iuseet mito Dept vavue’s C10 pan! ob =r G1, feales! sag pu 12) (12, * management "yys) _ hr nes yd lay i j fables b update Tema casing a fap F? vepAate SET depo = 201 ays F Te wonees empnane = ‘Shreyas! ; palate Wa ae € employs adengiog deopartmnenk oe : bat {_tuesy wie f> ELE egom Derk b> serect * “crom” seuect © padm:'Dephip! in - Pri tha dake ee 2

You might also like