0% found this document useful (0 votes)
259 views222 pages

Balu Sir Notes

Balu Sir(Hyderabad ) Complete Notes

Uploaded by

suresh yadav
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)
259 views222 pages

Balu Sir Notes

Balu Sir(Hyderabad ) Complete Notes

Uploaded by

suresh yadav
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/ 222
sue Sa | Qe lool, H * Bad Z { Dela: Cotieckion o¢ -facks and — figuie® >t Storing, DATA IN__“BooxS AND files: isodvantages: : 1) Coally fn -moatintanence 2 wad WEB OF CNN Pore’ A) Nok secre : i i) Reliving doko. win ke me. conaring . | & Ghen Campukes ove Gomes -to coord, Hheves 18 00 ANY se Soghsove’ ko. “Skee the Fie ond thok Eirrie ‘an, Brose’! Fies we skyed 8 Plat,-pties to) Tak pies - For choh we con reduce tho cronpouiel - SB Qykomokicon production opal ; $9 doneosed and past win ke fro . S rar lar FES. OR TEXT Ples_IN ComprrER® | Dioakoors: , io DFBbyving of. dake te compit caked Lecpuse «82 reed bo | wvike digpaent: oppitestion pregame Fer sobre j 2) Sesntky paoblerns esred Sto. picture hie eronoging the! * -§ Robe, Redundancy ond, In-cansiskaney duc’ bo «wliple i Coptes op the daka. ° : . ‘ 4) Reka. “tnbegvikty Cnainteins + dake) con. be adoped ooawediud ale q Tai tthustoena yuie® dota “Presafit under 0 beds files ie 5) No ifodexing enechantam ,. Fo! acnetsing he. chko. Fs0e eae tet pies: Damesse: “IL waa Spectated exeplume Fev managing Ue data — than alering- the. doko: \ 4. -Tun 18 pe DATA STORE oR PATA SywRce: oh ye a lenkien whee ue can toe the dota, where .- oka. 9 @ conection of Fock and Figures - we hove digperent types op daka ahoves avefiabie Inne, > “Beoks ond Ffice — Pak fies on a Cornpukey > Rekn baee- : Rarpgsee: ch dolabase 49 a spate Sopkuove tuk te “Pure doaigred For ranging Are cbka.:, Tn beeen @d2 9, 709 the commpk » oF dokahases , itsag-bern moiniy +o yogoWe «the problems oy drahack eo Fe Facing with the oder ayskem Re boos pat , Free ete, 1 Dalaboldes’ have Given a Pesmanent Soikion poy the VOvieuis Empno y ~7 Renpnome > Del —> Satan ch ude. a Eripi¢ Hubbard) Mp2 Enp3 Cusipo) 4 4 ees eee Paes SP Sap, ach salayohicren Chidion Solony ob Sep BSP o __ } | : ' ) Px] Le Both tHe Ni ay aoe ee lees lame. Oe . a ode oe signed on the velakionship model one Hoss 12 de sro many - Drowbacse o¢_ Hops: * > Benure 42 signed “none 4o man workiondip a chid Con hoye oy o asieqie parent: So, reoengp come’ Inko Tekuye vecnde of. doka dupeation . > Inher ese work bo axeaa the chia ta aii erode! ue need. bo Lyaver {yom the veob node step shop to the chatved leva, | which ui be Hime dyagumi “Wie pet dotobose Shak came trto existence, fn hievouchical roodei te IMs [ Snpormobiny, Moragement sytem] Peary xe _ Cunenty Lhe. wrdase vegubay ender windows 9S yond fy the hfeyorchicad model. ony. NDEMIE: [nokane Hlabaio Wonagment eyster “Whe Nekwoik mode} 83 0° modizicakion to the extikin ‘hiewaychicad model -ivirging many to mony Xn do the picture So tat a child con, ve mattiple parent: whch can ehiminake the rotatory / Erp e e. | Emp) Smp2- &enpS ee an eee orp yl — ae Byp -P Job satay chichen — Solay ob fe “Mf | : Nome alge cloes -cheeessing “the daka tn this model 12 very Fades becuse! tb eee potoles Pov ‘dent Spicolian of. the data IN 1965 the Frl Noems Lae lourched with the Name 98 Foams [Emlegrated atohote Monegernenl, Systorn) > Tree aie no mojer choukacka tn tia mode Le abty tho Seomediate Loxe over hy Reldkionad erode} in ap'a didnot Mare the Neksorx modct eunceaspe! * *RhoMs3 [FRetokionas Robdloase — Mon LE Spten| =Th woans and Neng dda ta organized tp the Foon of & Fee daudue which lore Compior to reanage andendetend! O90 -So ty evercome the pobem tn Ads Dy EF: Coop Faorn IBM come witha new Concept on Sbiting, the cota. Tn a koble Shudue Ye “Rows and cowmne of data. => EF-codd With ov bg Seas por the reco mode) Gated 03 “Retakionad Mode hos Published on arbi - with the Ke as NK Ralabionol lode! oF Doko. Foy Savge, Stored Bala Baan” > Basing on 4h9 above adticie many companies came foraovd ke Tem, “Ketokional Soplume wo [esnenkiy- eracie} ete: has skoiled the designed pr the nx dabakade . model 2 Roem. © >?’ RoBNg “is ratny based on -too mathematical -pincf pies “Relakionad cag ehva and calculus. ~7 In the Yoor ads cre has gtven the prolslype poy “ROBNS Knew aa uguyatern R” ~> ah the Year (ay Ter has toorched 0 tanpeage Por Commontcabion ith REGS Kinga aS BEGEL ai! ~> “We pak Reldkionad database was janched I the 4 aq the Yor leas ofith the ane moet yolabion®. daka Shove Polloued by Benciey mgress suet and “Ry “Baie, Tn the year 1039 TRetcbinad Sepbuove Ins has eunchel Tre eos PoRIGY database fn the moviel gh row Fe Syogle « ‘ ~ G~ o%b- QO13 Tigusogy Coop ‘Rues: Drep codd tn hte Reens Specipications bas proposed a Seb ©F vores thak-haa lo ke sokisipied by ddabase -to be cued 08 Reabionad ond ue caw theve toe a8 odd ‘Roles- “Were Gye 1a codd Boies which ave Propoacd by aad and any ddakn®e wit be catled as ‘Retahonal peda to Sabtay alkeost atx .0F the ordiijoble “Rules: bs The ThpT! BIE: chocwiing fe tia daa eee! 1 FRelckioned dobakoze rut be ed in the pom op Q table spd 98 Qaka tn the fm op Tows and Columns: & “The Goaranteep okceso Rue: ae ee eee Cykeniding to Ths rey vow of the table musk have a enique donkiptcakion for accessing the yao. 90, that we Con eosty Bex the ckatred Yow peor the bable-To do this * there shod be a coume % the table which doeadb contain Ce’) aniots duptcatos and, Noll values and to con that colomo | Op 0 Idenkity Ginn: ‘ “TS cratntoin a Goon as Ydenbiky We con Loe the Suppoit “OF spammany hey cirthiatet’ 8 Sysremene TREATHENT OF+NUL VAWES RULET cee Aeoiding: do ahs 0 cilakase shad aiiot stoving of “‘wonmann * Nott valees Unley @ Golomn of 0. table provided the value. %8 unKnean and Ye Nat role ahold be Capchte oF hhefog shoved under ay dabalypod conren tre. Sing oy Sobor pleat ov booean: & TRE View UPPATING “FWLE: CA View 13 a. logtcas tab. ahich ie Sed For Metntornin Crslple Coptes op tho deka withot “Kelundanry - “The best htog fo Qview f9 ony modification wa perform on the Lalsle "Replecks Soto the view - Reading be the Mew opdolsing vole the Views which ave Atopiaying he daka shod ai be oplatabie od those changps east ke “Replecked bck into the table. Denver CSbuctwved Eegish Ree Langeoge) atts a bon Shot hos “bee cess gre! for Qremunicobat” ith Ony RO_NS ard %t 1% “Gorman FY ah REA products ° SeayeEL now Known 2S Sar 1g @nbyoriedd by ANSE Crrrerican Nakionad akondayd TnutstoHten) ~ahSch gta the Specipications fir sar thar has te be foueund and 4 oa ee Tenpremesked by an Ue dobobase vendor 8 (ishohae’ oral > Kike M ho ouar alae’ >) Vitomge MICROSOFT, ORrcte, TBM) Sat '& a dadative en an uke 08 “popameding oa yo B Crt, TWA, CH come2 under” the Coley OF ‘en poralive prgarnenieg tage Dar: a ty tho dMded Solo pve Subpsioks Uke wor (Rake Dopwrition Language) DML (Gola mrorigniakion Largpage) Dal (volo Bey Langooge) Det CAaka corkso! Langrog?) Tel CHangection corkoot Longrogp? Dor: dais with Ho Skudove OF the chta. tb poviae? | Paxt commonds ote Ke, ~ cyeake, Aitey, dvop and Truncate 5} annkoing Eee | DHL deata with Ye deka Anreckiy and | sth the cabo. ony kk for volowving: SL cahtch contains OMY a Sting ie @ — SeLect cet mecep Dei deade oth the eavtity oF the dalg by sell the peimigaions pr User8 bo access acess: Ts conkoine Shree +Commrand? — Gnant, Kevorre and Dery “rot dala coh “Wansaction —mranagonent wahtoh conkorng the hres command in He Une, — Cortuit, Rorlkook nd Baavepsirle (Here He. 400 Abahomenla Dovid execube althe dame tima oy No of the Blakoment Aeutd execute) Se reo g rent hyn. any gor) veakyct the oe i an it Ne, Cen Seno) dolohase bok sar is a Longuage Ovocle Re Sapsetvey NK Ob o- = mayool= SL CLangrage) “Inqres3 a“ oxpare a +[06/a013, [Roy Se, Semver: =ck te cig an Roeng tha baa bean designed and devereped by adopting ate codd wies Tie déwlopirert “oF sa. gayor datokoae has been done. a8 fori +Ih 1984 Sybave Yelcosad Sal SeneY Fev ux ofewdling system (1998 Nicos, sykaee ond ctslen Tate fotnad hand? to launch Sar Servey For vg7e. Nolo: oh 3 an opeking system that is cketgeed by Micwsat ond “Dan 4h 1999, Nferoserl, sybase and Chabon “take ~wlarxe) Sel Sewer Io Rr 9/2 . 7 HEN (Ig Qersewey I) fa Yelvadedt wtth Support For eaincowdsso Kents - + th the Same year Aston Tale 4 ovk of Sel gency dosteaic % Th 1oq1 whevodat and “ar ended _fpfré-cleveloprrent of og/ 4 TA Mas Microw launched ttreleos WT Bel + Zn the Same yeoy Micwsef: and eybave Neleased Versa OF Sel Sewer oe eSrdavs NT- TEN 149 Mews: and SYboee eebropprrent OF RL er acy @rded and mtcvoiopt eatin to chyelop the Uirdievs Vextion OF Sal Sewer On) Syha90 cortimued bo develop the Oni% \evi on oF SAL vowey . ne UNIX Vewion 19q5 Mifevosopt Yeleased Version 6.0 of. saigewoY YIN 4096 Mmiemogl velealed voyTor) 65 of Aarrovey in 1909, siyoe Lott veeated veriFO) oO of dearaewor > TIn R000 Micvodegt eked at sever Roo KTicvorofl elected Se y Tn A005 MMicrowoFE yYeleched Sa. 2e¥¥CY B95 On Novernber 2005 In Ban = Mitcrolop —"Yelalad Sar SevIZY’ Qnoe on chuquil 8008 In Qo10 Miicroweh eluate Gar Rewe¥ Qe Ro on Dae ae EN BOD PACVoMFL veleated S8L_FEVVEY Qo19 9m On, Novch 90 12- ~ Nevaton year | “Releageniame Oodename \-0(o8/2) 1999 Sal gerver|-o 7 | . fey (eye) 199) Seltevver 41 a yaifmionr) | 1993 Retrevvert-Q-| SQunt bo 1995 pas S245 65 1996 Suet G5 Bg 0 14g Paviewey -4-0 Sphing on Aeon SaLIeXeY Moo Shiloh qo R00 5 sALeewel Qoo5, yukon ioe Roos Sauiewvey G096 Yeokimati 10-5 Ror SeLgeNey AOOAR2 |. Ket hieranjorO Wo Rolw PAL BeWey BO) 2 Verali . i a - Noles “TS Work uth Sar Sener We bay tuo colebase type \. dobcbase Engine Co) SeweY . 8: dokalase citert 2 "Ke dotcbase Engne “8 4 teney Where Rewer We On work 00 digporent Ler: > daobebage Client 8 the Me Whee the © Sapte C wey) : Sg ATH wo korn, 9M $a reweY ve uke Sar seney Manage mert Audio: the Sei Zeer. srk Yeelo: ued por by ting ths Vienl- wie fo the Tp We annect to Rewer Sewer bype Sewer rvorne Servey aubhentialfon Lega Tassword . x nthe seer ype Me fave types ~> Dokabore Engine P- “Trtegvate) seve? > Analyse server “C ote > Reporting sever Bb we Peper Gpbabase Engine, pecaude oe Been tn the operoking bern Sewer name Shovid hove he ve hove tuo Aype Sewertype- We a —> Window? caubrerical , iCalion’ ahe yy MAME y Sar gewer Cputhe Loncbus crvtericdtin cart OP ag th 4a @ecefed — one and tee 1 dolobare Engine aon Bewe! catthenicokioe won we POR to, Powwod ken “FT revtane ‘Pam orovd B “ the 9 Ng ayarer | uk on be poral bret PO? Ly ft Foxes panda hl 4 rinicd mee” ; Bl te nf art oHO \indoae 3 Sa Adm‘ usey ct shows a Window UH Th eanne} we wosk ond admin od Aye 00 , Tr : — | 06/2019 boring Lath atéenyee. Whie uorsing sith cat Server firs We necd 9 hose Veiion of Salseney we wont lo uinik with whit After chaesing the Veni He worl to eaIK,, WE Need! to chite the allio under this version. * Khe Micwnaee rrones Seizewey avaiable 'n mutiple Sitiont ith alppovent. feahies 4h ard dongetting alpfernl- vera Conentiy, we are povidel with the following editions ondev Sal seviey b+ Data center Tt te a fry fealered edibin eigned pr abla centers Unb peed igh levels Appitcakon port “Tse Editon has ben retved In Se sower oid. & Enlerpite ednon~ “Tite Satin inciudes he code alababase. engine ad cA on sewies ith a range. oF 018 For creating And rraraging Ralatase oh) Bovey —?PRolabae clerk Rlabawe Siffre 18 te plaw ive ix Sloe th cba ard ib Ie Pnlogerblec! wilh the 09 “witch an Le foond @ do aaa) Septem fenicos 4 : Sewice mae ™ Nole Apter tndlawing Sel sewer te 42th the sewer wv under the og ol ge lo alk mee Wo! Lye “Soup col hE. candy fhe Search ext “bat Which abtpiays a ai of opottirg cio Bewicea whith ane yuoning in He Lack ypeceye/ sy Heb- tub ce con fine! dhe btabete . Grighe nunig ([Broutervrer(rse eat sener) provider to Running Aebra ey Btolase Chink — Set Sener poviehs a cblatale cleat: ho) which acks 08 a Interpace be Ccommuricake with Lhe chlobose sowey thal 19 “Sey sewey ert- Studie". Wherever we open the Managerrent fy we eco! to fit Connect ith Fie hla. Expt cm) Exvver bb pom oy bisa operons te Larch =m oe > — Statbmenu" doteck Mn pegrarn 8 maiesopl sa 2orveY v double cick on et Bene! rmarogervent . > studio- one Lhe Blucko Geena te digpiays a cwtndao Eee QS Connect Sewey Sing which We aced +0 conned with the dolobase Empire. undef dot winolaa owe ved fo cuppiy te Bccing dials . It lype — Qhbahase mt ae 7 chee “oe ‘de maohine on which + Sewer Name ~ Spoly the nant 4 39 wnning, If i $4 on the. the database oy Sever 9 of ae ony-ov focal machine Specify the rome of lecol dim py Enley Local- C0 Dot ¢) 3: Aulferltcabion ~ “Lt th @ prowstr of verpying the crodeebiols wbroniien of a usey 10 bitin Peto te server. Bal sewer engpatt Io cbpperent Authentication moder for saa ane the SevV? le falindowA Aapotlicobion a: Ash fover rahi . gle Ynekauing % sal Sevvey WE. mrad sdecE an Stublerticotion mode for * ddabase fag tae fi ther Lebimdowk eetunbicabion MPA (few?) ay Mud. TE we apeot wlindews AuHunbicolim uihen ths wlerk connec te dhe server ik validales ~te acomnt name % panecord ori the wrdawy prrespol foxen 30 he gPeraling Sytem 40 fevyoy “eal nok ask Foy oy paseorid and doemot porparo “it teonkity volidlabion - hihen the user connects Ybodte Ba Jower ling Saldervey Mutenticalion Lopins Ove Crtdled in S&L tower Halle 20¢— + baitel on — kindow utey Actoonk eoth the wer name ond. Paucar oe ceoled by \uing aad Jomer and sled fn Shaver So User arnecting eitth tha Alterbiabion ocdle molt provide thy crecbrtiot Even tat ~ carneel + Niet Aftneews Mebtantcabion 11 0 defoust mmede # and 44. muah mare sewed Han sat devvey Hakbbenbicalion becuse % 0808 KerkoroS Security _protece |” for erpreing Pousrdl Seowity C1 1 axece hrm. enanirrint stor! £0 i) leabiod) pe ufing 2a sexe Autterbicohor We need bo App y login name and pasecaoyd onder correct to Sever and cbick. Cte comue bublon. bshowe 08 fp we chore winabuss ettoaticabion ohrectiy chtoe on the cervect ballon L aabes? tahteh connede 10 the “wer ard cae Con Alaa prorfermng operolion on te Bevvey: shoe ~ “aa (Pema) v Loncog With al S6eyer: 5 | ; : al enter 1A a cnection ¢ ohtabases pllove a dlabobose in a colection of yar0us object Ke Tabs , Viou8 Procedars furckons, Wighe , Indexes - efc ‘ ‘ Ptabaors order wr em Sowey re altviekd inbo @ Coleproee I Syslero ollabast user dalalecs- le System dalases “hes chlebala we lod! by gal Fe’ the functionality of Sal envoy and Wikbout hehe obhataice Lye aowey whi ak fonction. ueer® OF gal SoneY RITE ffien a cbvect support for yylating the 3npamation 4 lev clabohases “The system dababases fncluae these wv elababases 1. Masov a- Mode | 3. MsdB fy Tompala : 1-Maglor. “These chlabaee Yeas =a He gyslem IVR tasoctated —%th Ye sever 8 fornnation uray, came ot ty used 09 2 ample. fer we 8 or clababase clatakases tated en saldevv' ale a new abbabase Q py te Whey We ce g the rodetoblabate 15 Laikar andl gen with a Nneuname: 3 MEDG :- IE ts used for renng a sorng 7 abut obvis, obs ele. Ub ave Pevgarned “ty aL Coney agente &p- Chabtarppies) co fev hotln Ay Tenpop:- “HL 13 used 28 Q eoncgea Be -lempara: febes Hal ave crooked! onder Various ablaboses: ore we yealtl- the ener the tenp o ablalato ta dee aya) andl Bain recriaked: 0, 2 WP} rol fird ary einpreanf a Ceobedd pray usr dalahases:- Rese axe — clotabases Coled anno) meraged 4 he users fe Bloinge thoy abject Like tables Views clbya “BO create a cblobose open Ye - Audio Gnd in the heft Heel side, we find the option tol) linda object Explorer, per 2 ard) vl click on the node folabores and seiect New dalabase which ons a winduo asiing por ablabaee CPE Enter & parce onder tb: EL:- Sell! and eliok OK Which eveales a lalabages and actx tt onder the dalobases node . , Creat a aes Sig evoake we can at80 Crake & dalaknse wting Cvate Commnd which Ahovid be wed as folewsing Sylent- Goole Bhlabase albnames <7 PAnyvaiue cos -oprioral 2 cake a bable aa the awe paces, 40 the ranagernent- © Sudio , we Win Bind a baton New avery andey Lhe boovkay, Click on TE which opens a utndoa, under it witte the Fotowtng habermont Greoke Rabsbase Sq ST execute the atabement, sa an the ~—eoibor sie pind 0. 1, Breake alfek en te which “usm pawse ond’ secvle, Ake Stakemont Idhenevey & database eveaked on Sq! seriey, % win hac lao opeating Sypborn Files CA chlafie arA Loyptic. Dorape: “Tis 1s the fire abfch cenlatns chla arc? Thecka cath 08 a babes. indexes, Sore! proceckerek and Hes dela fies om either be a Pray oa chlogtie : Rarrowy cologtie contains the stork op Infosmakion fa athe. dalokote and pte to other pries associated OL lhe dolabase (nde) Rordaldoate eat one primeny datogite nd Bayod with an Erlontion amd Gralbeydaboptie) decerdony cklapite axe optional andl asrdeftred, we wha Sexardoy olafapie, when He olila $8 spread acrom mulbiple. obtsees ay pubiog Gh ple on a digprnt oltsk dive. we can hove Oy oumbor of Seconclany data pies gad thy ane with A Exdenion onde (nent clataptie). Locpiee “eae ties Conkain all He inpeornalton tat 78 vequited lo veeover a braradena %p the dolakate, Lemus te tricks Lansactimal eg Peperabten. Tove for Sach chlata&e whieh must fo aiteast one bag Fie 94 Gavel with an Exlemion + Lode (lag chataptie) “Te vec the mae and lp files of ablabase Hit Cod dive | i — > Go lo : \ program F11208\ temsopt ey Gewey\ M99@ Ll) NSsealserveR\NS6aL /naka lemde led Sq! log, dp lafogjanr3 Palalypes Yn Se Sever? ' A chtakipe fg an atkyskale tok Spspies wahab ty pe OF deta Q cownn Con hod 39 Tk ViKo. inbeger daka ‘sv Granda dala. oy monkey dakagy datea) time doba ov irony avings, and 80 ON, Sai Bower Supplies ack of, gystem cotabyes thet cepired an tre type 1 doko that Can be stored wsHthin ar Sewer. Acko typed fn SAL Sewer dive Oegeriied Fnbso Poveasing. Coheeeioos. | Evock, norrestes AApporinake current 3-Balo and -Rme 4 Characker 2bring 8 5+ Unfcede charactey Shings 6> binax sbrings 3+ other dako typos “Tareser Types: froct Number dlolalyes Unk loves Tobazor -Q3}! bo gt) _ Qh 49 hE! MoneeaRy og _cuntency T7PES’ Retalypes chk- veprosenle Moone bony oy correo \ajues —4QQ, 335,203 , 685, UTI S804, 999802, 8, Bipods Fax, 237 209,635, Wt S80t — Dy, S364 abies kp Bly, THe-3b4 + Bi; (Booean Type)! Ay nkegey type that can baxe a Vowwe of 1,0 oy NULL. Note ¢- Re shying vawes “TRoe AnD farse Converted to Bib Valves. “TRue 35 converted) to) and Fase js . Conveital +o Os Converting to bib promdes any non zo0 Value +o |- Sig TART Ceetmar EOP, S)] and nomeric [epLs)] ’ ‘Numeric dota. bypes thot have Fred preci stan and acals ‘P(pecisterd: “Whe maxtor okay numer of deta! esi; thats, be Stove d, both to the \epband 1) the igi can Pe OF decimat Pork» The Aho vight 4 “preciuson eros be a vawwe fae ) trash, the. monimom Preetaion of 38 We depauik precision fs Ie: S (Seale)? The monirym umber oF ecienat digit Ebet Con bo sted to vight of the decsrnai_ poinb: “Sca e soost be a Yowe Bprom © trough P- Score on be Specigicd ty ip predsin fs Sqecigied - The Mout Seale ig 0- Hani Sbrage sizes Vary asec w the prechion, as Foriowing Preciai on Stooge byhes Wg 5 to-1g 4 20-28 'g 8q-33 1} Flea: [in] aiid Teal + Approstenake noreker chitolypes poy U8e uth Fleking ‘Point sareric data ‘Polling ct fe appixtmate. Theepore net vaves jin the ype ean ke Yepresented exochy- Where n 1% the ro. of ‘Bete Wok ove used 40 Bhie the arkiosa OF the Poak romiey Qn Seierkipic — aetakion, ond , thereparg dictates Ire -prectiion and Shoage Size. TR 9 ts Speed tt cook ke OX volue by 1-and 53) The depowit value OF / n %3 5S ‘value Precision \sdigits dke_ond TIME Types’ Se. Sever expparls Fonastng dake and Hime 4ypes- Dake : Reptnes a date “2+ Ame Tc pvockionad gecords _ precision] # Depines a Lime op a.day . “he time 18, without time Zone -auarenest and 14 hosed oh OQ ay hovvdock « 3° Qoke time : epines @ colic Shak 78 combinal with ame op day with Fractional seconds thet a bated 8A Oy-howC) ax d= Sera Ade Time: Hepioes @ dake hob 1 aambired catha Ake oF day ie Hime 353 led on Q av-hovvelay, Wth Secon dh abun Xen Cs00) and at thwt Fractional Seandd + SHoke Hone 2 Crprodional seconds protsion’y] : Repines a dake Hat 3s combined with a Hime op day thar ta aged on @y hoov crociy Dobe Time 2. Can be cingscbyedl ad on Sulontion @ tho above Palereme kypo tha hob dersgew dbo. yoge: i ; 6-Qabetime qppact : | { prackional eands precinson) >| Rerine’ a dae Hak 18 combined with a Hime of a day that haw Amo zone awareness and fa, bated on %-hevy Cheek. [Ratoty pe “Kange Stooge | Dobe “Knuaayt,) A-D-}o Reemnbey 3 byes ee By 999g AD: iS “Wine 00:0000: 0000000 to Bhyter |__ 98169359 «9999099 ft — Raotme Deke Range “Janvay 11183, oo “4 December 3),4999 bytes - “Fme Range: dero0t00 b.O I 83769269: 994 | PAH Ole Tire Rae RangesTanudry 1,900, bo c by \e3 Tone 6, 9049 “Fine Range #00%00:00 bo 83:59:59 Whe Fi : ime 2 Rake Range: Fiony e001 Aro Bah 6 byleat ho Recerkor 8), 444% AO pein 3 at loytes TF Prcerarand 14 Lsay. ~ Vee Range *D0%00:00 to s bybos for 931691 89 #99 99.999 Othe preciiont Raker meoppret Date Range + Tanuaiy! cooitn. to Derembey 31,9999 AD “Time Range : 00:00700 to B3°BF 159+999.990/9 lobytes Giarperer nypes: Ave shing chtalyees of Sithev Feel jength or varlablo hengh + char Cem'] + Fixed length. non-onicole sbiing claka, n degines Hhe abving Length ard must be & voive From Ibo 8,000. The Skonge size ts 9 bytes: 2 Navehar [Cn troot}] Variable length, non -onicede abirg data, 1 degsnes the sbing length aad can be a Yowe pam } tp B00" Max Mndeoakes thol-Herroxiror Shwvage size. 19 a"! bytes Cage: The skeage sxe 12 ack length of dhe dake cntered +R hybed- 3+ Lent s Same 08 avchax(max) . ue nchov [C07] # Fixed 1eng th wnicede shying daba.ndepines the din \ and rust be & vapue From | bp 4009” Tre sage ate 13 EMD timer OF bytes: 5. nvarchay flatman J: Variable unicoole Pig a depres the xing Jongh and Gan be O rane fron! Lyoco «rea indvates hal the Mmanimurn Beage Siac Vd of"! bytes (068). The Storage ote tat byes Ls hao —fimes th adual rength of data enterd raljees 6 Obent+ Aame as nvaychay¢man)- * Bintaky Type - Binary cblalypes of Ether pred length oy Vorfabie Length fir sling Bireny valaes like Fmages, Audio ancl videos: Ie ‘nang [tor] » fied lengl-h bincey dalo. with a lenghh of 7 bytes hae 9 18 a vaue for 1 le som» Te alevage tas ig A bytes - a Varbinaoy [én roaco J Vartabie longth Binary dala-n ca be a / Value form +1 bo 8000. max indicabes thaé the maximum ~ Slotge Eke 18 Q3!-! bykos Lega)» The Skaage Ste tg te adual lero of te Sala &nlowd +a gles 2+ Image + Same as Vow binary Cmax) - Nove:- bei nkext and ‘mage cblobypes wh) be vemoved in the fakne version of Micvogopk eat gency Ovo td BING Vhese dota.lypes tn cw deviopment Work, and pion Ae enodtpy Gpplicakion® Hot omenliy vse them. vse Orerchor Cmax}, varchayémax), and ‘vo bt navy (max) Soatead . : 1 —yepreren - National Cnverchay J OTHER Gora “Wpes: 1" Resivesan: Ts @ data bype Hol crposcea autematican econ fofoay rombers usthin a dokabas® Roa veraion 1% cevally used 88 O& Frechanuim PoY , Version Stamping tobie YO3. Te Sboage size % Bbytes- “The Yoo veSon dilal-ype € an ‘ncrerenting nombey ani dees nt preaewo 2 che oda. fme- Nevsion *horer upto Won, OF SELSERVER uae hove. a. cotaly pe “Rimes whi) 99 uBed poy veraton Storr ping talole Yous: “That cobolype af) depiecaked Ge, Lhe Gment version And Yksodueed th roo vertion. Bo, TE FB PCE ociieed bo use —Rerestamp onyroye & UNigue TRewnieR: Te, a 16 byte Gurr Cote onigpe Rdaligrey) a aoomn oF ys datatype oa be Sri obaed Eh @ Volw ing the newrd Fonction S- Xoo. 2g a dotekigne Mak: ahoves » Fpskances of Uselporrned xml In “The slavoge ‘epreientabion - xmo dolokyre Exceed QGB In Size be Sal__avignk 2A Coomn OF ARs ype can skove Yawves of ignore chiahypes - For exampie @ co1mn dogired 08% 3q\ vavvant con sore Frb, binary md chareatey stk an baye & monimorn length aos byes: TS Zrcwelos tath a base bype “nfosenaLion q the kate we TR, aaferorn lergth e He Ocul. bare Lape vos: typo. value 1% Sayles - xn dala @e con gboe to coiomn OF xm! type Smlances cannot: yajues oo. 5-Cuysoy A cldabyre for vatabies ef Shaved. procedure Sp petornetora ‘ho akan a veFeIence to % Curboy “Tie ansoy dolabyes cant bo ved fey & cowmn In Q Create Tage Shabernenl- 6 Table: gg opectal catoly pe Yhot can be vsed to Bove A yesuik sek Fer poceating ak o oles Lime In % Prdion of Skored proedwe Creaking a babie + Sepla- Crake Tabie [. al) > Tobie Name mox be untque undy the ddaboae’ > “The name of the fabe shoud be Yonging b/w 1 to Hedowais ” 7 Never skat tobie nomes atth nomevicgs toy) Spectod chatodess Ard alo do not ave Bpoce® In koble names: Te there HE nuilipie GoVd3 combine them with ap (4). 77 “Fe tmesionom No. of: Cowrmns @ take can have fn bhe avant Vevrion OF Ber Sever 79 Joay 21- “S creale a boble far Qulonerg tn bank Ceake table Customer (cuaktd-Aink, Crore varchar Sel) Balance Asmat (4,9, rood Smowhake time, clty Voychar C6 0)) , “To cate the Jebie undey a chkahase Fost open M4 dudfo pwvide the Authentimbion deloiie ard wasor Now click on the New Query lotto OF the op hich opens a winded 00 the top oe “it We Pind a Combele box “lHkeng gui the dobabcies Chose yoo dalshase Gan) ond then chek on bhe execute bubton ‘which Cyed:es the ‘tebe In Lhe edtecled datahase. ApteY cvealing the tobe ff we wonk fo Know the chucluae of the bable ony +sme-U%) the alalement Epe-Sp_ heip a SP_ Help Cuskomey “Nseen NG “RecgRes To_THE_“PBLEw = dtax ¢-Lhaet nko From 13 a predestined fonchion which relomne the Sewer date and —¥me “Fting an _Tecwd & e_the doko: Adoc: * Bom custemey “Rebaung Saected — qnunna: oe Select usd, crame, Ballance Fromm cuetorney Felawing, coymns of a sobre, Io_o deatved _ovder-- Select cuted, Crome, eRby Aad, Bale Form euttorrey SRaviving caomn8_ oF a page tah alfaa name 7 Seleck custid, ename as [rustoner Nore), REY) APP 08 ahcrcort- opening, Poke] | “Balmee Prom cubteney Note: alia shud be Yeprembed in 2 ube we pode spacer. “Reewig Serecled Yeoode faom tebe: Seeck * Rom cuatemey Kheve “Ralonce +6000 Note s- where clawe $8 used Foy Yeabicling onwxanked Yeootds Fsom tho ‘bable Seteck * Brom Owlomey hee Sky 1S NOLL Wie comparing couran =Vawe with awe cde aud Mer age Equal C=) and rot Equal (24) opadknr In tok Poce we shuid vse rs nui ond TS NObNOLL “Beowae NOH. frpnile ov Indepnite oy unknoin iolue? Se, Ne +o MO volues can be Compare uflth tach othoy- I~ Tone-aois Upsaing (update command ):- Upeale “canrnand 4g used for meaieying % 0. exteking chlo {hos 4 Present under ao table Sytars- update cLoamey Sek = ] . Se Updoke cudlomoy Sek Balance = genp where coakfd= foo! Nobe + White Upbating oy doteling a vecoid & bbhoxs Condkion 3 Trondckoty — fox onigue SdenBgicakion OF Lhe veco(d. tT aslspe Couns can ‘eo updake : update CuRtemey Seb Ralonoe =hos9 of ty -t 7 : =Woag, oF by woh cosktd: irs. \y hydevahad where Zur updake customer Set Aoo~=Gebtater.» Where AooTs nun. : | Ao | Devere conmano- cL ts usd por chicks a CONSANE "3 Yecords) | ot | Born a boble Sylar i Delele Fon | Eat Releke From Suskomey Where Cultd = tos Daepteg a babe xh 48 Q process of desteoytng the Extslence of the objec tn the dobabase rable F Syrbores Ropelname> table Exe Drop , tutlomoy : Rata Inrearry: Ih computing, data tiagity repae bo Tatrlatning and asswing Ue aceurocy and —Congtatency of the data” ever L3 enktye Lifecycle and f3 an Impotan|- Faakuvo 6 dakckose (OW REBMS tem. Tato. Snbeg by means that the doka corloined 3n Ehe cbtabase 16 Gecwake and yolioble: To povide pkagyity oF dota “RPS provides ie Qa Sek oF reply consbrateks which enevve? deta, Erlevod tke dobakase fe came valid 9° Gonsiatent dt | ad ark Si 0 Arkegrtty worevoint8 ave kasteay og thee se are 7 7. Salty They, nc anewing rrvlliple vous \o have Same Sidnbiky afthin a tolie. “T ~ “Piierary Key 5 ueigues 7% Bnd Srlegityy Peitytoka adaka “lo piedesined dake. “Fogeinbal Tnlegyity, Reqiivodl the extalene of @ yelaked yoo {9 ordthor Lable- + Coneremnrs t- Ser Sewey Supports Ftve aongbafnks For mes ring data Inbogytty those ave Je Nor Note Qs UNIQUE 3. PRuanry KEY Me Cheers 5 Foregin key “Naot Gonghasnt3 ave Smposed on Coiomns OF & table bNor at + OR \neae conatiatat t% tmpoded on a gorwme, Ero Cewren in nok @iioey 01} Valve® nko > Sankar Creake Table < Nok Mal donwl, - 3) ey Creake “hie customer ( Cuaktd ank Nok Noll, name yorchar(s0) Balance Becimal (an) Ron exrats doke Hirne Nok NolL, ctky varchoy (50), Nike Nor wot onthaints con be fmposed 09 ange Nomoay of Cowmns - ) — “Theoit Into Customer vaives (100) , \Rase, Booo, NOLL , “Aeletd!) “Th the abn age we ave bying 40 Yngert @ Cowen Voie moo on which the nok nol consevaink 1S Tenposed Bo, the treet Stakornerks Execution falia- Saks & column on which toe wwellhen we Seek O on vou Nat non Con@byatnt 1S Imposed, the execvkion OF the Angels ehokerrent 1% besminated by chepiaying & veey Friendly enor messa lenitog Lhe veason For esminabion od iso Specigies the dokobase, the table and the Colomn Where the “Pihiern rr oauyed> ; (Siw). ONIGVE ConsTRANT: TE hia — Conthainl- ts tmposed: on a. Conran, Liat coonn win No hoa dupiteake valves inko Sb» uyshe Creake “Tabie aame > ( [econanagnk Ce Ay) Nobo s- Love consbernt type fo Ye senge, % can be tarique co” primary Key (of) Check Cal) Foregn 4 algo EL Creche bobie cuatamey Coaahtd “igpe, Cname vaychay(50) , Boalarae Decimal (2), Yop Srrawfaketime Not vole , Sty” Notes Vovchoncso1) “Tp we fore a depricate bho corkaina untae Gonetvaint on ib, the atokerranls Set Fearetinolked dip ing an Srey menage wok shal- enor ress “te, we lida She cowmn “care whee the vidlakian ge coowed TL only dhpiay the Gmvoint mare Lerique, Pil erany Key cheok ad paregin | aon hai nts Vaiue into a comA aye independent dyecte under the database which ave Created and Inked uth the conmn of the babie £0, Frey hove they own “deoltly oy name fe, the reason Why~ Gg these Fay aanvingint ® “ove viovdbec) they wil) revey ben the eowmn there the viowation caved: Arey win nig” - ciepry hey name. . Ackyou a& constyaint nome oshtie, dovenity che lable n wane to a. candrvains mat be degned by v& Ext creaking a lable hy giving eu Create boloie custorney ¢ Case id Ink Constraint ‘custtd HUTIGUey vnigue, - Came vorchev(se) Balonce decimal (4,22, Aer stort Sxrandoke fiene nak woul, ctey voychorl wo) | 06 eons Dupsing Cousmmars oN TABLE: tle can tenpoee constraints ways I» Coumn levee trnprsing a condAbvaint QTahie devel imposing on aloble in boo ob gent a congbraint Th the’ Prat cage, wo poovide Ube canabeatrh ‘npamaion : beatle the Comma ony Where 08 th the eae Fak dopine an khe Couns and then We coping. cenpbotrke on the .Cokmne: "Nore: We Connot impose nok Avi constant tr Table jevol» Tk 48 Possible ony Foy vea- of Le Fou Con rkvaintd - : Coiumn — fever ‘opasing a conssatat f ° - Crecke bolle customer (cudtd tnt consbainh avetid_ unique vogue, ename varchay(ss), Balonce decimal (4,2), oo Senor dole Hme Nob null city vorclen(50))) 7 “Tobie led Sempoaing a @nthainks Creake bobie Customey C custid nk, emame rqrchor(sd, Balance décimel (4, 21> Aop Sra doketime, NOENULL , Ci vanchay( 0), Contharit aiskid_onigpie antojie Ccuttd)) 5 Covpasite — cunuhasnt- ‘ “Yree °% 0 digpereoe: tn behoviowr Whether the Comthoin: 8 Smpored t Sabie. \evel Cat). Coiwmn level luk ip @ conthoit 73 fmposed tn | dabje level ae Have, on advorkege of “oponng Sabie eves trkB WFO 8h tne Conttyaink GN PMP: Colusnr2. Armee pol Ponjagela Tbilee Hind Dodo Lal pat wage” Rilsadooiny Connaugh | pace ati the there lable ctly and Barchcode Gums rnval- be imposed th A carmposite —Conanaink 29% Creake bobie Branch Neains ( Cty vorchai(G), Byancheode Vinchay Ci, Branch tole Voricheci(S0) nrviairk city Be ‘Nor UR vtigue (city, Branch cade). “Re dothack with a rob soil conta: 93 SL til drow doptato values ahr & a8 Inase oF Onqne commraints Sb wit aoa moll Vadnes - “PRwary JKey_constrawt: TL 23 aq Gonbination of urigue ard Nos lL which deesdt nos Nut aa te 23 dbpiteae Votues Soto GQ Column (of) Qorumns. V8INg — Primaw Rey Be Can “enpte ent} inlagtly » We can impose only one pimasy Key conthaint on a Loble- which con be 3 Esther on a Binge ov Tvilfpe cowmns areo. Fe Compute ‘Pimay key. fo auoweds B%% — Column lever Smmpasfog ” prinncay- ky onhamk Creake Table Customey ( aukid tok Consbratnt cuabid — PK primary key; Crome verchavse), @edonce Decimal €9,2), ooo Sonat Dabetime nok wv, City vorchay C50) “Tale. teve: Imposing ‘primay Rey conahoint Create Jabio Brarch® eros PLY vorchar (80), Byorcheode Vorthartie), Branch Vocaksan yorchay (501) eooshaink chy Be PK pane Key (cfky , Branhede) ) CHects congrrant tk 3 @ cmabraink which enpmcos clerroin thle} listing the poastbe” vanes hak Can be ertoyed ‘ntoa cowmnns Oy) Cowmn. Vr awn led ieee Lothar s Create Labie Cuslorner( Cusk%d INT Conthaint Custid-Fs Primonyney, Crome. Varchar(ed, Balance Decimal (4,2) Constraint -Balance- Ck Check ( Bolance >= 1000), AVD Amar Gale Teene Nor VOL, oy vorchay (509), “Tobie level. imposing Constraints eyeake alice Customey( cusk'd ink, ename varchar), Batorce Hecimal C4, 2), COP SmabiWaletime Nok NULL» ey verchar(so) > Condlotnt cualid— PA primony Koy Couskid), Conthaint —“Bolance-ck Check (Bavonce > = 000) 3 .@ \g]oslaois —— ko Foreien Hey CONSTRAINT” Ws conskatnl 48 used Foy fdiec voreva thob %% prevent Providing vegerertias Aobegsity For the deka Fa cowmn (ox) Coumng “Fab %% $b veopives the’ sxithence & a welded Yea ‘in andthe table: TS impose Goveign Key Condhitir tae Rawle the — PNAWING Frings Notes: Povelgn Key constant $3 oxd PY Yelabing (ov) nding 4u0 tabies with tach other ane. then verry the extatence of me tables deta In the othev- tle Yeguie two ‘tebies FY Binding with each othev and thyee Joo tables vat have & comm on corm Pov finnteg the +abies: v “Depa Empeyce tobi : > Regtno, Empno Same exsprome: 7 hocabion Hi Tob come eau Te the choo” cage, the ~ 9 , © eo. ° hag Yeferad unde’ the. * f-epwmnn of Rept lobie I ‘ Empoyee fable. So In thie antexb : the oe O teporl oe a matey vy a pment «Lable e ee ic 78 Yepcwed ag DBelai, Cot) ate one al Rened. 09 Bdhaited table Ne: The common com tha 13 presen fn looth the shu Jebie® need not have the Bayne nore kot thely dolatypes must be ame- The common cownn Uhak 18 pregant onder the pavert oF Morter table 19 Kron a8 & Yeperente Lown Gnd yeperence Key cafomn Bhovid not Cantain dpricake VoIves fn %- Sa, we need +o Ywpose, Bithey unique (00 Prima 4 carthdint on thak orem. XR we ‘mpone ‘Primary Koy conthaink on the YRevence ey coun thal coun win ago be the Fdenkiky ovum oF the +tobie THe commen cowmn which 38 present ’n the child of cblofied. fable iA Known 48 Rarcige wey coumn Gnd we necd Ip fmpese’ q Fovelin Hoy constyagol on the atom thick, Vefes fp yepevence Koy corn 9P pMobey obie- Repartment ebies( Master Cov) Parent tebe) (pe= (Pedal or) hid table) Sores Rephnal—> Foret 9 to a. 7W Cathe chgotnrat tebe Geeake “Table Repaitment (Reptno Te ConasLyesct > Beptno— PK Prmray Key, Dname varcharl5e) , Loc vaychaxC5e ))7 Treat vais; “Theo nko Bepoiiment vawwes( fo, “eoarea) (nurbat!)° 2 Treat ‘Sinto Rerartinert rou wes (20, ¢ , Praeckion, ‘chara! 3 stat frto Bepastmen- valuey (30> \ Einoace” Bathe"), ° } Inet nto Bepootrent vawvas (ho, C Reesechy bag To creale chid toble % Re —Tinpoatng Fae knit to_coumne IN Creake lalie Smpryee( empno tok, Ercme verchentse), Fob Vor hare), SalavY Beotmal (+, 2), Hepe no ant corynoto Depkno. p< Repexnices Repai ment (epinoy) Timgeing Poeign_tey conta “Tahe. pe!" Create abe Employee C&mpn0 ib, erame yaychar (se) ) Jb Narchor (50), Sabor Decimal Gy 2k Beptno tnk, Conthotne Begeno— FH Forign Key (Seprno) Xogacnces Pepoakrert — CReptro!) Now: \akie imposing & Preigo key errant ” bebe lev wn deed to eupitchiy 982 the Faeign rey one bo cicy the fareign Key OM where a8 ib! us Fregn on eve) ‘oedause Ae Yeqtined wahte Ymposing 79 COM the a 49 odd beatde the Fores? Vey Colusnq ony : : When we Fenpoee the Poveign Key conuhaint Ond ealablish ‘erakion® between the table, the Pataing threo les Wit Come ‘oto plotwe “Rue! + Conn Ingett © vaiwe thko the Foren courary Bovided tho vaso %3 rb extely undey the. Yegevence Key oun OF mastey™ table "Beat Cann, deteke a vecwd Pron the magkey babe Fivided hat vewds yepererce Mey vowe hag chad Yeoud8 8m the chtid toble utthat addvesting. aha ~to do with the ditd yeand 9 - Bwe3 + eannot oploLe the vepevence Key value of. amosted Lote provided thet Voive has coneaponcing child. Seads 2n the dato lable catttouk addvossing hak red Awch with the iid Yeni» Mlosiis TE we work to chicke co) update a veo!d in the matey i i in the chiid Lcbie when thy hove Conenpandt chid yecord3 in Lolie we one Provided with a ect of wies ‘oe Pe te delete ard opdate opevokions Kram 09 Deble. wles oy op yale s- Delere Roes: OA Relete No cAckion aN Rdeke cosgede on Bette Sel nolL on Adele Sek Mepavit v Res oA Update No Ackiod on update catende “7 lake Sek null on anes Set Qempt oN Seere Nootcrion “U7 ON _LPpATE Nb_cAcTioN This 19 the cepaw! mio hal fg appied on Ube Chiel Lobies Hat veshtct cleteling a veerél in the mally tabie cod opobl a reperence Key 4 0 mater lable then Covesondig chi reaydg % \presert uncby the dd dnbe ON Skkere CASCADE CG) _ON OPPHTE CASCARE Ze his we 48 appred while creating the chit! fbpe we con cbele o reco in a master table or update Pre. veforernne Key vatue of the mailer Hable, Sven pe Here axe Ghd Yeeude in He child babre- Bub aten with I Ye chiel tobe veut win he obbded if A leuk a Foreign vey vane wir be wrote TFT tA opeake ON Qeere per que AND _Ow OppATe SET Nutt: vets Th Uits~ cage algo sklebing ey Ypabking refennce ay of motor babe 19 psi bre whan amospordin ahivel year 0% Sitting in the child tobi bub 4 One opckjofe OY upeate 2 master labio He Caneypencing Chita) ye coidA + feoige vue chorges bo Moll. Nove iy Hed yes ihe foreign iy morn shou! not contain Ck : Nor Nut. Conthaink on Fé o Ne Reere Str REALTY CAND gn: yon : a = uphaTe er _PEpAuT Tis 1s Sam as ser nue but In vl Case ohiid Jebics Pecign rey value 9els Updaked cath oleate vali 1 fia como. nilere 05° Ff 0 lopart alee 14 rat Proidadl A-y-the coumn poll Mo te oe pau ty alepwit Voll. cp we want to _Tepeue_a Deere RUE OR UPRATE Rye kiWLE. CRemng “Te CM TABLE: Belelo vies and le wes were nol- fonposed on rnaghel lables Hey ave tenypobed! on tte Chitol Lobe hol to on be freigr a coumn. 42 —foracing Sapte f° < lohan 7 e.cnthaint Repevence® C2RKLo1>) 67 Celete Ff Noctchun Iéescade | set nue Set Depot P 8n updlal-e gt Mogan | Caleocle] Set wutz) set Aepowegy éx:- Credle Labia. Employee € Empno tol, “Frame vorhar 60, Tob varcharcéo), Balry Pecioal (42), Beplro ine enthainl: Giylro-F Reforerced Beportment (epine) 00 Aebke Corede on ofdlake caxade,) ‘Fiowiding Depaul ‘Fawe_feY a_colunnt em > Tho copouut., de pout vave flor 4 quumn 3g Noll, pv a ° Lya rok Be coun 13 cok tropa sad with Nor Wilt or ee FAL te H 4 » table we hove GE ap she time oF creating the ‘tal . coma 60 thal oF (My oxy own derdvit awe on th og ; shod opsityery tihen toe raevt @ yearld Into the lable ve “ean ae Qrotee te thot conmnn éuberabical thy coleman: Corner. Into pice and §niertod nl a hltero as if we povide @ vale thot vole. ong ail Gnserted Syr- “nee abe Grpigee Cempro inl, name varchar(6o), gob vachar ss sapeay Decimal cya) Nepeut 000, Bgno ink Conthaink — Rptro- fs Weforercer Rperhrent- CBD On Relle Cohende om Opel catcade) Edt- Replno nk Defowkl -40 conslyaml Dplno-fte References Repatrat Cpt) an Babe sob abfawté ‘on. paabe opbunt ) QoTone 413 “Trusdoy ae Stig “REPERENTIAL CINTEGRITy- “TRis 12 game as the ‘Roprentiol Tolegity we hae. learnt Cniiey: “Ih covley @ses we or binding the cumn of Alobic with another coiumn of notte’ toble Where 2S in Sep yefeecnbiat Fokegty we bine a cowmnn of a babe with anothey Cownn oF Bame Lake %-¢ beth Foreign Key and Primoy Key Win be Present in ene babe only. Comme ; Pirwrany Rey Evi ployee Foreign rey , Kemmpno Ename | Tob “ign j {ooo Navesh “Preetdenk {00} Scot foanagey ‘oot 102 seith saesmin | {oo3. Biaxe Clery °° 04 Raju emanagev 1.000 too | AY | Strath | POH elevis* 1010 —> -tavalid 1006 Tomes Th Me cbve fable we Ge” Kincling the coum ogc for eg rey) with anothey cow of the same table Le Grpno(’ Repeence hey) te veviey the vane ebored Fake man conn to ke exteting onder Bmpno come Lectin Empoyee Labie using Qu aonebyainks fn column leve! Creale “Table Empioyee ( Empno nk conabroint Empno — Px Primoy rey, Ename vaychay (60) NoTNott, “Tob varchar Ge), ™g? stat anikyoint ™M9N-Fk “Reforences Empioyee CEmpne), salon Decimal che) Depaoit 3000 conslaatnk Sal-ex check Ceotany Bebwee? 5000 arcl 18005), Depno ok anakroink Depboo- Fi Rerewnce Repartment (Repk-no) ) 4 Lo veitrng Reco8 bo the above bable-- - Loentity property” n @ babie fov creaking @ idenkity we can apply this o coumn for the tobe. Low t- Tdenbt ed, in ement) Sy" entity c Ser cy —TReae two aye optional . Sed 13 the vave ie used poy the vey Prat Yo thal te leaded into bobic- vawe 7 added. bo the idertityy- STrerement t8 the tnevemertal. Vows of the, previous Yoo thak was loaded - Naor- oy moe Specipy both Sead and $ncrement on nelthey, sh nether 13 specify, the depaut is.) => Crealing jobie ky using. dork ty Junction rau Tae ewpliev Bid ink Tderkiey 101, 1), Sname Vaychar( 50), Goede varchar (66), Lecokion varchar (50), y ~ —hrecliog valued :- Th éevk Into Supiter CSname, Good, Loakion) vaiue al‘aeuir, ' Coot vise , tnycerabad ) Nole:- we cadt tngove a vaiwe into be Fdentity column Expicity, buk we aan tnaert by éobting @ Identity. Inseve ‘Property as ow dopavit 18 Off Which chi nok A110) Enplict- ingotting S ~> Tdankity Popatiy docad t Promize ant uniqueness to the Coun vouuse- Cp we cionk ufqueness ce shovid expliciesy Smpose efthey onique oy ‘Prtemany Key conakyaiat on that coma. ~> Tent Fundkion con Geroale ony Thlegey values ad Gererate Qupha Numarte “volo: “7 tahen On “Tdorkiky Cowmn 19 exfeling For a kabie with Pequent deletion pe wilt occur bebaeen “Cdentitia values - So) when Frequent deiekion on being done on a table do not uge the ‘donkey Property» However IL 18 SLAI Possibie to Flu Lhe existing gop by eAding the Tdertity. Enger! popertyo5 on Spey t— Sat cenbiby — nacre on When we act the property G9 ox TE Gin Allow to Ingord Vaiwee explicilty into the identity cover, Eur- Sek “Identity _Tnaert Sepplier of ~~ “Tagext Tako suppier (Sid, Same, Good3, Locaki on) Vales (50,(am’, (Coe! ving! , ‘Hyderabad? ) TIE we aot to yeabicd ‘naorting Values nko “Hanky expiciay Sek the “propaity aS ofr “again ag — Folwing - Ext- Sel. —Lelork}Ly_ -Cngert Sopplier opr ALTER “Tate _Quimanpe using the aibey “Table Command we an porpasen the. owing? ackione on @ kobic: we can sAcicase / Recvease the width oF a coum Q-we can change the dolalype oF % column- B we can Change the Nok Nutt +o Nat on NU! to NobNDl! yswe can Add a new Column B+ we can drop a exiking over 6 we mn add a New congtraint A- we can dyop a exiatin cons! - Disable /re-encbie choo ‘conatvaint OF Example: Geoke Tablestudent Lyarnk on OL Lobie. a kabie- Sno Ink, name vorchoy (0) : —> auctor ko Perpam Fava thyee operativns = jek 2- Attey kable “TramerAlkey column [xpidths) [Nout /nok ut] 2% Change the width op 6 Cowman Snare pn slucent lable Ear cKitoy Table student cAltey com Srame varchar (100) Note* when we §nowase the width of @ column we donk hove any Probiem but“ while decreasing the width, if the Labie corkaing daka %n tk we cannot decrease the aul tess than the mox existing chovackerg ‘In the ono. 1 Changing the chlo. bype of. a covma Sxr-wMkey Tabie Skudent cAikev Column i Snome nvarchor (ioe) 4 changing the column Nott bp Nok Noll ExIm cpikey Table skudenk Alkey coma _ SAO Ink Nok Nott H changing Nor Nat bo Non Ex- ctlkev “Tabie Skudent alley cormn ~ Bic SN0 Ink null Aloo Adding ao New Coumn onder a _ tobe: Syrkars- Atkey Table < Thomex Add 3000) > Ne Can drop Qn existing Column — __—4 CAlkey Table ev Chitey “Table Skudent Dyop Giomn Grade Se We can odd a new consbraint. opened) Aiker Tabie atdd Lonsbraint 5 Mi Alor Tile stadenk odd conseatnk feed Sepak Berane Seo poy Fees - Note: Repaurt te net a dtrect consliotal bob tp we warted to “Provide cm ate a. cepa vosue Fe any exiting ae oe te band we can adi 1 a@ a anetvain: 09 WE Column: > Aker Tapie shudent Add Gneaint seame— ua urigue Cename) Adding Pitomy Key 00a. Exisling coumny Sp Be Tf we waned to ad} a “Pilmary Key consbraint on any LT most be No Noy cowwmn then ony Primary Key Contant Gn be arlekac- 2x4 Neer Table atulenk chibey cowmn sno ink Not Null ” ee ene rece cno ste ory ea We can drop ao tanking combaint ony a table Alter Table Altey Obie Studer: Top comhaint SNome_-ue Alor Tobie Studer Drop couthaink Sne- PIX ~ Disable / re-enable Check contra) of & table. Syston: cH Table Nacheck /check cenakaink Str~ “Tgert toto Shader f9n0, Fees) vawes ¢ el, 2500) —hity yasge an Sry Thasit Ybor ehod CA key Talore Tz we Tenake a bobie an the wos of te labie caithouk "4 shen “Wurcabing a brie te Simncn te delete Alakemen) cit}, NO where clBBe. Ugueer “Wale Aabie 4 faster md Whea -fawey sypter and Warsacttoo 104 yesouyousg + Jn case oF huncae Where Ceuzed can be appifed: in case of delske hub mck fn cose oF huncabe Te a able 18 brencd-ad “dentiky cowenn of the table 1% Yeas} 4p eed Value: Whee a& delete whi not do thak- TIE we -hunale the tabie %& verroves all 1008 From tthe lalsic, oul the tabie dbuduve cuomng, Condyainks yernain vocharged. te cannat -huncake the doka tn the matey ~tabie- Sher Commana a “This Command 18 Used fer yebesving o. doka foun a tobie Con babies * Sytaut Beck | (0) <7 ov (-1) 69? shove sling &pession- Relusng the Agel) os i Sarma | cele vawe op the lept most chavacker 19 the exprertion eowck ctecn ('), arscit (sHend ) Op 65 FR Ca): ConvevtB Qhen misery code bo a chavackey Select char C40) Op -% 3 a) CHA i 3) NewaRcn): Felung the Weed character Fer the Specipied Integey @q:- select Nchay C856); op? __pcanbe gyealey than ase also ~ 4) LEN (3)! “Rekwns Lhe numbor of Characters tn the Specified string option crasading brralin g Spaces 2g aeieck Len (title), Len (the ho "), ten ved) yes where Len(enarne Eg; Sete Flom Emp 9) CRARINDEX (exp Seorches for an e%pressvon yokwn tke Skavking ‘indet position r~ Qoleck Choraadon Chu? bree anid) Charindex (to? “eto world’) 15 Chovtodex Clos trrenowertd), ©) Charindey (tet, CHetlo wortd! J /o — a bdtle a avery to _get he Lak of Enployee twhoac name Contain Char SX in fhe fete) 18 Sebel: ¥ Bom Emp uhere Charinclex. (0, Fnarre dre] ) Covent (hing value 4, Sling. value 2 Lf Abving value wI): “Vlurns a Shing he the veaul op. Concabinating 2 0Y Move Bbiing values Bgi geicel concote (twend!, (now, Cave’, ‘you'); Formatted with the Specified Farenat- Cd, B/N, Cy CJ and Sn optional Culture tn Sak Sewer g012- use the FORMAL Funckion for Locast- aware Formatting of. dake /Hme, auebey and cenfoncy vawes » =) Formar( value, Format Ls gikurey): Rebung a voc Dake pormatbing-- Selec Cgkgabec), Famat (dotWake or, 0) select GelMakec)» Fumal (Get dake tr, 6 py the in’) Saeol- GetHakec), Fomar (tretfisket ?, 'p, Uypem) Number Ferrmmaleting: - Select Fusenal- (1294567, Wn) Sdack Femak (12945b4, tn! Chi-in’) Conenoy- Faamabting - Sdect Pamat (1294564, coy) Sdect femak (1294564, Le’, Uneein’) Mon day | 24 [o6ja013 Ec:- Geieck Empno, Game, Tob Formal (utedhle,‘d', ‘hi- in’) “AS Pos Formal (ay 'c) Uni-in). A Sasary fom emp . th Eh HET 9): Relong the let poe op He abi aitth & Specitice mumber of characters &u:- Select: heel Cyene’, 3) He) > Write a fey to velortve tho Itek of Enpryoes chose Meme Slot with +e chuacler 5 Aeleck * Flom Emp there Lert (Ename, e's? wg wath bh Filgtr(s,9: Fetus the vighk pak oF the alring Bi) oe Zprcipted number of Chawelens- Ex:- Sotecl Fighl (‘Heuo} 3) Ao > Wrike a @uey + get the tal of Employees C8 with fe chavader 4 - ce Sere * fom Emp bhete Right (éname, °F whose name Pile a wey fo get the ial F Srpryers hose name Cobsnl Character ‘ol tn 9 pace Select * im Emp where Giglt Lege Grane, 3) @ Dwestang (5, stark, LeMth® Falun Par of a choader tng Terk py trnage Exnegsten from He. jr va Detect Sbabirg (‘He10, 2 3) > Wrile a auery ly get te ite of Enpoyees ubhobe Nome contains horcley Sp 3 place Select * far Emp where ausshing ( Kaame} 3,4) fa" > Wie a auery +p get te iret of Emproyecs whose ame Grtding chovacey tn tl. Select * fom Emp where CHARINDEX (bo, Ename) 1 =O elect + From Emp bohere cHarinoex ( (a, Ename) 7 =! Lawl C9) + Felumna an Expression) agley Conveting abla to a Lowercase: Satect lax ('HeU0') Co hero as Select Linpno, Lower Céname) A Game, Job, Sat from Emp [fren (a Fetwns an Expression aptev ey dla into Omemse Select. Uppev c' veto!) ™ Hen Zetec knpno, Upper (érane) as Frame, Tob, Sat from Emp b- -yemoyes Liana? “Kato a characley Sxyoension arley it a Locdiing peks soled Len (g Heo’) e Seted ben (ime (&.. Hed} 5. Beleck den. (' teno’), Len(ierim ( “ e110!) ) Fitama (3' Fetus a chomder iaking Blanns- Select hen (‘Hei0... ”), Len Rlatm (‘He1!0 ) CP 5 o Fence ts shing_ seach, Shing — yeplacernent)3~ Tepaces aol accurances of the seach shing vaue cilh replacement sting value. sting after lunceking alt Zeied ‘Fepiace Clete wed) 2) yu Hexno wood Bere “Toh Smith To hn smith Sat + from Emp whore Loame = bby Smith’ Sacce * from Emp coho Game + (Fhnsmith? yr elect * from rp where Reprace Chrome, *'")* hremith) nenith “Feplicare 8,9) “Fepeals a Shog Jaue fo specipted rupnbor of times. Sela Footcate (!eud, 3) GB HeiicHeto Hetto PRERSECS): “Felons Q yeverBe ovdey of & ohnng nnd Zeled “Reverso (ello) ‘ olleH 2 a 4 dorader (aun ; Doone Felene a simiiaily of two sbings Eure Soleck Seunderl cron’) Sander Clenvw’) ~~ erect Sounder (lsrath'), Soundon.c! sry eled- Seundlerfereer! ), Sunder (lover!) sponces) ade bo aAm:- C880 460 C460 S pap 73D 63? G650 C650 > pute Se1oce 4 fy = sent, sry on om inp bheve. Ename = ‘smith? é * For Gp whore” Enant. « smyth? Select « fiom Emp where sowelex { Enume) = Leunckr (Sith) 5 . ov) ; aaect + from emp here! oeunden Lename) = sounder C'seryht) ‘Notes Sos Convers an alphanumote ‘biG to a feu Character code Hat 45 basa 89 haw He Shing Sends ‘hen Spowon the Piva: chavader of the code 4g tho fivst characte! OF he given Expression Qnvetlcd by oppercase. The eccond 4 fourth chamclers of he code ave symbers that weprelert- AL” leltews In Lhe Expression (yy “DuppEReneé (5, $2): “Felarns an inlegor vaue bhat Sndiicates Ke pl aaa Alpena bebicen Yo sourcbr vase of -tuo chavader Lynton Noes Coundbx Cade fiom clepeenl Sbii9s can te compared bo Pno), Bata length (Erame> from Emp seiecl- Enpro, Enagne, Tob, Sal, Balesirr (yy, Hivesabe, Get Rokeo) 08 Senortig, from Emp J —> write a Buewy te geb the Kel vf Empioyecs Werke for ime elect 4 Fro Emp uboe Dale Bire( yy, jinedole, Gebbater) =32 “Dirrectno tetaleperty rombar late)? Feleng a nenaabotime vote 69” aabling an ihewoe +o the pecipied abatc pat of the Peified bbe Ar Oded: Pateaon (dd 162, Gee eute 0’) Qoi9- 12-19. 10H: 124 1 Bele Daredoo (om, 48, Gel- Sale ) BO1G=AD-A5 13:03232-H4? "RTE ROM PARTS pu, rronlt, day)’ TBlung @ able value poy be SPpetpiod ff month ar! Maly Dare MME ERIN pars Cyean orth oly Four, iiniouke , 6econels Mili Secs) “Raluns a cbletime value Por Hbe Specigied clale and time “TIME FROM pers Chow uke, Seconds, Fractions, Precinion). “Fetus A Hw value Por the SPRIFed time od with the Spaspiod “Precision: Sy Select QarepRomparrs (19480114) Setecl- Daren E FROMPARTS (1978, 07, IT 12) 50, 30) 00) Sek Tine FRONPARTS CU.53, 96 20,3) Sacel- TE PROMPARTS (1,53) 36, 00,4) ap Barre Cspowin) ¢ Relurna | ip the See eee valid late; OO olherwtse “Raluins o & Sebel Ispare (6/25 /208, “r5 Datel ‘26/06 jeord), eebare ('0r3/ches) 7% 1 0 | SepdrepAAT f format oat the ovcbr tte roth, olay, an fer-dale pants for inlewpreting clte %n a Sson = Format Can be -mdy (clepavt) rg. yd) sin, mych and in Eyer Seat DoT DATE FORMAT dliny etal TéMake ('06/05 /n0)9), Ts O4reC'25 /o6/>019'), Taare ( 2015 /¢¢/28°) > ofp ano) woe? a ~ - ae Rog Cawversion fgncrona: “TRe Funckiors ave dababy pe to ‘other Cast (cxpessior yeSSi0N AS Sale Lype Le engi?) 4 Anes oy emreagin OF one data. \ype to ancbhey- y- Select cast (Gelpatec) a9 varchar(i2)) aged for Comvetting a Wile Feomene Y Po Longh “8 optional The dopanit vale © flag hiA30 fai 26 2013] eq eect cast (1a5-456 a9 fob) o/p 423 Comer r(dabatypre Leergth)], ex, preacton[, aby!s])! Conwik 1g Some as cast al, _ eq eoteck Comet (vorcherts), Geltben) 0 adleck comer (vavohar int, laartBe ie) Length 83 on opkionad Integer’ “hot opecipies He lendh of Aaiget dola type: The depooit value 1g 80 {ye % antehag lan \bot: opecrpies how the Cawoik Gretion bos chansiate the expression. TR Skye te Nuc Now +18 Yeluyned: When Gapression 48 0 date oy & Hme chta ‘ype, style con ba one of Ahege valued £ loo Lo Hh, 1R0, JA}, 198, 124) 130, 13) Quiith cenhegy) Lot) 1 ko B to, 4, 12, 14 Cust thoul cork) Nelo ebyle © er too, Q oy fo, 13 ey 13) Qo oF 1a0, and al of 1a) arwoya yehunk the Conloy Cryyy) Ent- Selec Convert (varchovCla); GdDalec), lor) 86) a6/eo1s Seleck convert Crarchaverd, Get Raber ),!02) Selec convert Cyaychovl2)) GokMabec),10 3.) Sec Comet Cyarchovll2), GetMalec), 3 ) 26/0613 Lshen expression 1S money on Srnant money skyle ean, ‘oe . oy one of these. vowed: & 1,2, t26 (Bqptvelient: Blut e go use 3b _ Ashen Comering +fo achay tov) nvorchay) =9 Seeck convert Gevchoy, Sal, ©) Foe Emp Select conveit Grarchay, Sat, 1) From emp Selec Comort Cverchay Sad, 2) Prom Bmp 8, 5,p00 5 Loren. foverons + Qtesse CindeX , voL-1, val-2 F, val -». {): Retons the tom ab te Specified index From a iat OF awed o/p -30 Sq: Seteck chasse (3, !9 20) 30 49 So) s),— Febvns one RHF Chaolean ~ expression, tue —vavey Fat se NON); SS oyeesivo ae eae ee the Booka SAPr OF kwo vowed dependi on whethey Cvatuake 4o tue OY Fase: oP t= t ) lyai! wai €9:- Sdlock WF Clo<90, veo, Lai!) eno Select UE (10720, “vend, wa?) Went 409) free. ncn Host —1pc): Reton’ te warxstaHen Rdorktpreaion Cee coorwakekioN eeplapieatin nombey 29 the rprocss 18 et the Agpricakion on the Gient Oompvter that 49 to Say se1v0r 25 sereck Host 1807 Bquy Hosrxaneo. “Rehyng the worskaken ame: : : faded ait cnet) Sone Ienuneric (expression): Delammines Whethey an expregsion 3S ~ @ yatid nomeric hype. NewiD0)> cveakes a unique vorue oF type unigquatdentiprev . sacha) ER Soleck tenumericCio-66)) FS Numeric (thet) , a rwmer cCreoe *P-~) 8 4 Nikez- We ute the newtd Funckion For inserti 4 @ vaivee Into a cown hh a onigne Ylerkipier dabalype: - SESNULL (Check —expession, Yeplacernent.vakxe) + Replaces na catth the Spal fied Yeplatement Yalwe- Bt Seleck 19M0lt Coo, 200), Je HLL (wat, 900) oe oS Employee Waite a. euey Jo get the tbat Sad of BUEMPIOY JF Seleak Empra,Enaine, Tob Soir cermr, $A! 18nvronm,0) 28 Total sal Fro ‘Emp fi yy vodue - Nober-cx4 enithmelte opevalion pesposmed Cee wit Falun @ non veuteeagain Cone sce ( expression G. 0) *Retuina the Favs non nel! bot Expression umong %S ogre me fg Same 9 JeNOlL bo Con be giver eatth sobiple Expressing eye Seteck contesce Cnytt, now,to, 20, Nov), 30) \o- i Coaesoe Seleck Empno, Ehame, Tel, Sa Coron, Sait NW Conn, od a9 Tetasal Fram erp Nowe Cexpessioi: expe nied “Felun8 @ Now Vole Ip the hwo Specipied expression 8 are equa. oy eige veluing Fiyat Crpression eq Seleck NoLup Co, Qo), NULL ( to, 10) po WoLL SABE: raduabes a ital of conditions and wlovns one of mrutbigte Weoolie Yeauit Sxpressiona-“Te Cage Exsreason has two fasmass \. TRe Simpe Cake Expressin Which Compayes an Expressior With seb of vawes ty delosmine the yesulk Sayrhay CASE }opul eapression WHEN Value Tien vesuib expression p--0] Cleive eiee_vesvit, expression} En. 43 B= Wike a Suery fo Ave a “Comment Coumn on the erage table a3 Presiden: ~“‘Bighess Momogey Boss Aroioyst — Scaentix? otheth Empupe Dorr Saeck Empre, Erame Job O8e Tob ) ha 'pyaidant! then ‘Taxps® When ‘nanagei? then bo93 5 bhen Larnauygt! then ‘Scfeatlit Else “Empeyee? End as comment PRom Emp Olathe a Suey fo Gna a, niet comin on the Employee yahe 808) ats Seleck Empno, ename, Sal, case Sal When $ai> 3000 Then Abooregeh when QL = 8000 Then “On Tavge fise ‘Bela Tor! ee end ae Comm Jy Setect —Empno, ename, Sal; Coe San (201 - 3000) When 1° Then & atlbove Tengel” When 0 hen . on vege Eve lectow Targel! End as. comment Bioen emp: Q- The _ Searched “cage Eapressio? which evobuoles a Gel A ae expression Yo dotesmine the reavlk CASE WHEN ? Koluing the vonk of Cah yow tn the table- 2 4r° Sead Fagroy Snare Sal, “Fonk() over Corder Emp dfout - 14¢ gat) Salat Lonpto, Lame, sat, Ranke) over Corder by sab} Frore Emp ' by 28) fro ~> Nile a Gacy hb gee the top + salaried. Emmpioyer> the -Jabe with they Tanks * Selec: Top # Empno , Ename, Sal, “Rank-£) over Corder by 908 Dese) from Emp Paitionied Clause can be Gppiied foe obtvieing 0 groping data basing on ay Cured - Fait ig T Suck ferro, Krome, Sat, Depo, Tana c1 or or er by fal Dee) from Emp : op Bybee ) ¥ Sebck Linpna, tome, sal, Tob, Rank) over ( pastihon by Jos exolev by sal Bese) from Em fabio t Pr Giscig! “DNSE RANK) oveR (Cportitm by. clause < oilerby cause 2): Redand —He nk 2 ews in He table, catthoul- any fepein ihe raking” = Select Empno, Ename, sal, ense- fant) over Larder by sak “Dese) £r0m Gop Steet Empno, Erame, Sal, Deplno, Dense. Banc) overCader-by Pastition 4 clepino order 4 Se Besc) fiwn Emp Saket Empno, Frome, eal, Bey Tob, Bente Ranke) Over partition Tob oydey by gat Gese) fian Emp- + alin take He ‘4 / Pett nat fs Fu Cportibion-by -croue] LNoMIBERC) eR Gxélor by Clase >): Rela Uw ob rae Number of a wr in te fable ober being vebrieve ot glarting abl for the first rou Each postition Br Lele Lmpno, Crame, sal, Row number () oveR (order by” al. dlete) —forn emp Bai tal. “Empno, Ename, sal. Ropl-no, Row—numer (? ove’ ¢ pain ay alpina order 3 gal Desc) fury tmp NTLE Cinlger Exprovaive) over(Cpartiton by — cious ea) Wile ow Query 40 Gee the tokol. fnvestment made Por Satovies Srory month - : : _ ere Sul sat) +sum(comm) AS tokol aolories Pom Emp Seeck Empne, Ename, Sai, comm, Sol +1SNULL (Comm, 0) &S “Toko, Salory From Emp Serct Enpne, Crome, ol, Comm, Cat r)Swoui Comm, 0) 12. 03 CArmuatsolany From Emp Aozrenysgenr OpemnmR: Te Soc sign (=> ts the ony assigned oferatoy Conpreson opeenTOR” Comparision oparatora teal shelter feo Expression Ge the Same, Ge con Use Comparision Operators GL Expressing excep Write a Quey to get the Vat of Empioyecs caring a Saloy Jreatev thon S000 Se\- ; ==" Select * From Emp Where Sa) 73000 om * Rom @mp Where sall< 3000 Cee Sov0 >In the coge he value Beso can of¢o be taxen Inlo Considoralten’s i< Equals! p= I> Squats _ Wk a to get tho lek OF employees whose Tob to Tarogey With & solomy of yoo Sei Saeck A fiom Emp Where Tob =\nanaept! and ab=t9° ~> ke Q Guay to get tho Wh of Empinpes of a Casing. Solony “we than io with solernnoh ; ond Job =2abetr™ Se- Sdeck » From Emp ‘Urexe Sal-~S000 > vite @ he Wh of Empoyees wh Aevk, managey Bet Chrous So- Sec % From Emp where Tob “Crerk or NF “Tob = ‘wanager” or Tob = Araup (eter, ‘morage””» Sancsapr) aio. woh 3 ot a Saeck w From emp Whee Tb 1 Sdect * Lom emp Where Td Nobin (Sateanas, ‘ pratident’ ) Cov) Seleol “From “Bmp Where “hy <> ‘Salesman’ And Tob<> © president? > Witke Gey to get the Uk oF Smpeyeos bhose. Sollovies Feo 000 +o Sooo Sdact + From hase emp Where Sales ‘Between 3000 and Sooo to!) Saeck * Fromm Emp have Sol ><3000 ond Sal<= 8000 Note:- Bekaxon operator Jokes Nax and min Spor values go nko endidevabion Soteck ¥ From &MP Wheve Not sol < 3000 and nob Sal | > 3000 > Witke a aucy to get the Vek of Empeycoa ets Sobeay hol °3 \essthon Seo Ddeck x Fom emp Where Sal< 3o00 w) Saleck = Bom eenp Where nor Saf >= 3000 ~> lite a Sey to Jer Me Ka oR Employer nore chovts catty the chovockes Sy sai fiBeiect * Wom emp Wheve Lert (Ename, 1) © ‘s) ™ Con here space wu nok Ge Sareck » From Emp where Enome Uke Lowy Ju Sdeck x Porn emp where Lert (Ubvim (enor), ea (on) seteck ¥ Farm Emp Where Evin (Ename) LiKe op? whose, _ bite & suey to et a lek of Employees Whole Mane 18 Srotth ov smth. Solt- Select » Fem temp whose gander ¢ Brame) = SeundoxC'smah) Salt Carel wo agjesis ~A%* * Rom emp where Ename Uke tem- tH Ske operaoy ckeberrrines Whelhey a Spectgic characke~ Shing matches 0. Speciped Fobloin Mitle a to Geb the eb oF Empioyees ubese name sabes with any charackov between As So Seleck 3 From Emp Where Enome Line fca coi,’ boy) L Setels 8 Prom Emp Where Ename Lxefiecorrayp? bile a auc to er the Vat oF Emmpoyee Whose name doesdt “Stok totth Charoakeys between 0-9 Bole Selec 1 Brom Emp where Erame Nok Une" [a9 Jn lov) Select -* From emp Where nome Like ‘(Aa-g) a tol) Seledl- » From Emp whore Enome Like’ PPobalers} =) lov) See ¥ From emp Where Ename Ure \th-z] ye SET Operators: SAL SERVER “provide The. Fonscving geb OPeralers WNch Cornkines Foals fon two oy Mmore queries Fko a Snge yosuit Sek “Rode aye : = Union = untonat) ~ Intersect - Bicept “To Combine -the YeaoikS of wo gueves we need +0 Boe he below basic wed l= “The rember and the ayder op the Columns rus be Same in the Olt Gperies ae The dato Liypes crust be compatfloie- shitke a Quoxy to Pind out the fobs assecelad StH) dephno go § Bo : Set Soteck Te From , on sonvon + Co aera kines the veaults o ttan oy move Gueyies Into “8 Sig yogull 2eb:, that tnowdies al the yows belong do an queries %n the union eliminabion, Lhol praics UNIow All? Same a3 union bul dupitcates win nok oe Eltmknaked Su Sdect Web Tom Emp uhere. Repene = 20 Ntont Sect Toh From bmp vheve heptne = 30 toy) Sect Job fom Union a Select’ Job From Emp Emp here Tepkno= 20 where ‘Depkne = S° Trerseer: “Reluins — Yelurned by both jhe OH vight aides OF Fneraeck —opevane- he — Carnmon obs Of sUstte a sw to ge lepine ao © 30. Sor Seteck “Th fiom mp where Repkro 20 Enceraect Select Doh Pom Emp there Dopkno= 30 were any tiki volues From the Jerr vighk Hob ayo not found of the - : —> hh ns a Swey, to Jet the jee tha are specific Deptno 2 When compared wlth Repno BO Byeope? Zed= Adod ob fram emp Where Repino = a0 Excopl: Seeck Job fiom &mp Where Rephno = 30 “ata Concalenglton opevabore + ++ = 3) {uiitke 0 QW to Commot a Ke end Spur Gatoyy te emote) Sy Aleck Empne, “end + Ename + ‘Yoo Saiay w+" Comert (-varhor(i2), Sen’) 28 comment From emp Select Exrpmn, Cnend + nace + il agony we fernat- (3a, be triad)’ as Comment from Emp Gevin ‘abtios Noses “to__coumne: ite can yr oti 8 Neme +0 coon in the gerech vet 39 wo i pReient way: ay Salecl, Empno, Enomne , Sat as Sahory ad Sareck Er Ename, = Sal From mal TOPNO, ra Salon y (80%) CICNIBES: We can add aheae ‘ae bp @ Guery for adkiorat opkons We Pilleya » groping » Swrennging ars . P ee t 7 Where ~ Groopy ~ Hang ~ ORVER By bihere See O& Search condition for the vous Yehunecd by Ane ery 8 Thok te wth reihtol OH the Srumnted — cbko- cipied Gap By: teed Foy greeny Q ob of ous Inko a Sek oF Sma yous basing on the vowues OF ome or) move Commnn’ “t > Wile a suey +o pind ub the ™nr Loring fy the Orgarizakton - ore Selec w) From emp hoy OF Emploges DwWrike a Guey jo Find dub she toto! number OF Ecnpayecd eatenging 4o Zach department: - 10 Belek Conk 4) fiom emp Groupey Deptno (ov) : (excatien Emp| Setect- cbeprno Empcount = Export) pore 7 From emp Gepky . ckpkn? 2 eee sr tL ca 3 6 6 wv” ¢ | the. dokow TF we are Grovpry ciopse in aucty pak the lsat nf np the okie wy be divided into drreent J and. then on the Coun Spoctpied 0 Ahe Grmpay cavse the. Ereaikes the Group Forckion on Gach GveuP fo ger ne Yesuia - . ~> Wwte a Suey to geb no-oF- Empiyers Por gach job Sp\2~ Sareck Toh, comb Cx) From emp Gyoop®7 =pe (ov) Seaect, Job, Empcouak = Count (=) From &mp Grdyp8¥ Tob: Emp-i5 a $s Ao eo a P 3 5 3 } 23" ile “sing Groep & Clouse ta a Bey - cae need +o “Favs coy coneidey He fans. I+ When @ Goup-finckion is appted on a Groop FL veluins omy a Singe vate buk och groop Gan rebun & Sepovale— Volne - Q Uae Grmp-by Clouse ony on a Cos cupiate VoIuea, never OPP Y a moni > Wythe a aucry to get tte mbar OF Smpoyee 8 wing In Zach fob Fev ach depaitment- umn which Conlans que CowmMN - Sh- -seteck degkno, 0b, Empeounk = coont(#) From Emp Qvoup 8 Bepkno, Tab cidey by Deptno When we ase mulltpe coumos In a Speup 4 Cravee hak, data tn the ‘ate 19 vided ‘basing on the FYB «Sern OF he gH cieuge and then each Gru '© Sub-detded bot on the Seand = cowmnn a the, Sroupey cause abd then the Soup puncin ® Lach ‘nney group ty get The yeguit | Aeney biock Eme —-{15 7 ree gy cen => | S appl a) s Manage’ ———> ' Presiden ——> |! |_ © 5 a6 Cerise Igo Ss Q 2 a WBepwo-- ~ si fost da “Eaup ged _Cte _opoatys: “Bouup: Crerevokes a Simple group by agg “PS Wo-Lakals and aso a Gund toad Yow yowR a : =H Selede Count ( Fromm emp Serecb Repkno; ceonk (4) From Emp Grup By deptno SAE Bepkno, Tob eounkls) From Emp Group &Y dople, Job order By lepine, ob. Coy) Se tect Bepbno, Tob count (3) From Srp Croup By “Ronwp Cero Hb) 5% oS eplno Aob Count to Cle ' \o Moragy — * to Resident | lo Not! a Xo ClevK ao Manager 1 a Solesman 3 ao Nol 6 20 Clevk x 30 Mareger ' 30 Anatoyt 3 30 Nott 6 Now Now 6 Cube operdior Gererabe a afmpe Groop By agqregrabe! Yous, Youu Aggregrake and crogs~ babulalion Yous: BE Seteck count cd From np deck Rekro-counk GO From Erp Geop ky Depkno Selick: Felby courk (%) From Emp Group by Fol Sdleck Repro, Sob, caunl-x fom, Emp Grup @y Vegiro) Tob oicler By depino, Tob Coy) Sqr Selec Rephno Tob counk VA fom emp Grp By ake (Repino Tob) pe ———$ + -—-—_—— a , Repo. 7 | 5| p : 1 3 ao Bo- of - Arayse — 3 lev k 5 Manager 2 Freardent 3 Ealesman shhtle a ery sto get the highest Sabeoy tn the “Oppatzalion folk Select. (Hox Casal) Fon emp 7 Mike. uey 4 get the highest saloay oF Sach depbabm Ser Selack Been Nav Cal) Form Sp Grasp By Repro > WWike a Suey to find ouk the ighes!: eal of each oft, ateng eth Ye name of the Empoyee Sor Select Gephoo,waxtsas), Ename from emp Group BY Repino- We Trvolid- Nobo ~The abne Suey wn Ack be execvbed Pecause while ust qeepey crave fo & stolemen’ ia Sdeck Hub can conkain OMY Uniee things 79 I+ Coumna thok are aseoctaked Mth Groop ey CIMMES Ce Ag grogiote Cot) Group funckfon & 3+ Constants Comp ay “ry o TIA aw above auery Enome adocan Fan undey Gry of 4 rales the thee 20, Ye “cannot be vied %0 the select fe Gin { Selec Peptno, wax Caan, Crore from Emp Eup depo ave Solel, Depew, Hon caddl, Gd-Doke From Seni Gmup By depino , y} vod Select Depo, “eb Mag, Coan}, Lend From Emp Grup By \ define “ob y von, >iatle a Quay fo get the bolal frvoshnenl being mode ©N Saloyies For an the Ernpiy eos, Foy gach Sob 24 fo Zech Jch In each ves Soe- Seteck, Repino, Jeb, 2um(Sat) Hom Emp Gooop By Rowup (Regine, Tob) » > Wike a Suey to gee On the Hee above aS Wal 2% Tobui8e Fnvestmenk aLse- Sols- Vetect Deoptno, Jeb, Sum(Sas) prern emp Groop 4 cube (Repleo, ob) —> Wike a Buey sto Find cal he fotad number oF clevks io the Svgantzabion - S Slt Select Count (4) From &mp Where Tob = ‘cleik’ — Wike q ay to Find oxk Ye umber of Clevk8 tn Each degaritenent Say9- Bepiey, : nen “AlN Seleck "Comk @ fom emp Where gob = cieyk’ Group &Y ; Repino > Uyite a avery to Geb she. number 9 F Penge in oe clgastrent oon 5g eons 1% Gyeaker than 5 ~ Sdeck Aeplng, Count Cx) From Emp Where cankl) > 5 Giop By dinn i Tawatd Sdeck Peskne, covskts Flom emp Crap By deptro Hosting counkC') > 5 Hone cones “This close 13 also used for esbitting, Ube dala: Suet ke Wheve Clause Whe digperence \ekween Where Claxse and uous) ciate. fg % Where Clouse 18 used for restricting the vooe ‘efme Sntoping and Howng clause 48 used for Yesbuchiog the wwe Apter gioping - . y eo % TE He veshidn 13 agscceted Cs aggre Foretion we cannot use Whee couse ve We Waving cause only: * Whee clause can be used po vesbick! individual vaus Where a3 Hoving classe %s vged aleng with Gap OY Clouse +o Filler Cov) veatyick & Groups: ¥ tore Cruse Cannot be appred wrtthouk a grap by’ Clow. > Vike a Suey to Bnd cal the number oF Employees Zach job ony ip the cunt ig 98 thon 5 Soie- Goieok Tob, cont) From emp ubere Counktexc5 Cuoop @y eb: € Tob waving Cont <5 —>\ivike a auery to And aul the number oF Ciena fo Zoch bpad-rnent as Sp whe cont 73 gfeakor than 3 So\2- Sobeck doping AG Count &) From Emp where 3ob= Layer) Coop By deprng, Yoving desple? conk(s) 7!” ) Selec depo Corrk ts) rome rnp \Wheve Tobe'ceye! Grup By depine Waving Cunt we] Yq : oa “Tabio —» Where % = Corooply. L—oyder Be to ) Wovens 20 2 & B® 2 Bo. 2 30 2 Order by Clouse: “Ik tg used fey Sorkt we 9 the data Sivher nr ascending cai) descending oidey TOF O acre ‘i fed (at of Cournnlg)- basing o & Spec emul Ssptor: order 8 [ease | exc } ausaing my) : wv Sahack Empno, Chame, Sal, Comm, Qeptno - From Emp cider by Sat. Select gmp, Crome, Sal, Comm, Repine Fron EMP oder by sa) Seac Soke. Empne, Enome, eal, Comm, Nepkno FY) Emp Khore Repkno ea order yy say, Come Nokes \dhen te have motbiple conmn® 4 oxdeY by Clause, the dolin Frist gee arnanged basing 0 the Fiat coum and iF ony dupicate Values in the Fhsk cotumn than te wt Foxe tho Seppe OF dd Quma Send cum For -anangemenb ey ©8e Secon wit nok ke used- ae Empno , Ename, SaR, Comm, Neptno From emp a mae . Chere one. comme Order ey gad, comm cae. ‘in ode other ig bso | 2 Jeeyjao3 “Tuerday Offer Ap FETCH options _undey _ ovelor By_cause- When appiying the order by crouse using the oppach option &@ Con elimindke the rumbor of rows Fron the ebavbing- Yeord * . ey elect Empno Erame, gy Prom Emp ordey wy ORI opal 6 Rows ~— Skips prvak B yecidS in ke yesvlk eB using the felch we con Speci FY Sho norbey OF yoa% to velein after the oFFSet clouse 18 processed ey Select Empno, Enome, 8a! fiom Emp oidey by ©) of peck 5 Tous Felch Noxt 5 Rows only + Geka Ye rs pom 6-lo th Ho Youle SKIPPING prs SB wus: . Ee. Geek Eingre, Frame, SAL FI Emp eveet boy eo ofpact © “ROWS fakth Newt © RODS only. = Goca the Fivat & vane oF Yhe yeaulk- Dus= Guenits cA Suery anetde anokhey very Sab - auery: $a Known CB O% Syhout- Selec From (the o suery to gob the detatis oF the Employee 8 who 18 earning the highest: Salary. sol Seieek max(Sat) Neck 3 Fam tmp Where Sat = (eeleck ~ From ale) —> thhike auery 40 get the Second highest Batontd- Eapiage dokatis % the organtaation Solt- eteck a form Emp Where Sef = Where sat = C Select Mare sar) From emp Where Sal < Cseied Maxcsat) fiom emp >) —7 wile a auery 4o get the sbiye higheel: ed Eenpiayeo. debate in the ovganicakion. Sol- Soleo -# Fiom emp Where Sole CBceck Hoxcsot) Fan emp where Sat «(elect nay (ead From Eon phheerdl Seiec: Hox (sou) Fron emp?)) We ean sei the auevies upto Bz ony Niet IF he choe conte, 40 get the dR highest Selo Ecepoyee chlo we ove caitebing pxl Queries: es a bub the Max number of auedies posnttted to Neaking ig ony 32: aaa a auey to get the chlotio of Brpoyecs oer king 7 Soles cepaitment Sat- Select dope ¥ Fm &mp Where Ropkno = (select Repno From Rept hae Dname = ( gates’) & —> Witke a Quer y 40 gek the Irak of Empbyees workin Sin Chenna’ - my v Belt Select > Flom Bmp Where Repke (Seleck Depino Frm Veph here Lec = (chennai) > White a Sey to get He lak op Employees who 1s Earning. coore. than Yaghest: Salary oF clepevo 30: Sekt Sereck x From Emp Where eal 7 Codec ak cea) from Emp Where Replro <80) Co) Select» From Emp Wheve sal 7 AN De pir 230) Pinte a aucy to get the ane oF the man eg slay” (elect waa Sad Prom Emp hove tahoe 1 caring 1e8® thon the 10> clopino Qo- So.- Seck + Rom emp here Sal tle 02 ower to got the Wak op Employees uahe {3 eaining the highest: Sadary $a tach ch pottrort- Sy Selecb 4 From em Where Sala IN (saeck wat(oal) Fém emp Croup By Heptno ) “In Operator also con be uged with Sb- Queries Ghen the Snney auery %% Yeluning move than 1 Value Tua fe we used APY fon) gone and Ou) operalor ® “Eb, operator 33 wed for EQqpali conditio 9 Whereas, ANY Co Sone AND CALL operabors ore uned e iN Case the condition 13 jess than, lesttran cre equal OY Sroakorthan, greater thanneqpal - “The above Query 13 Five gebting sthe hitghes!: salooy °F och clopaytmert and then using those awe? 39 the oukev ocr So, the problem In ‘hs execution 4% IE the Vobues! solavies makchos eatth other aalaries 10 the ckgomors ten tp they ave. Ibe: higheth °F le 6000 clepantment wit, be yelertved. ap a 000 * 0 10 | Boo 28 te Selec 4 From Enp where to \ tooo 7° tics Deptno+® / + gar iw 8 bead (Sereck -qepkno +) + HAL (BBN) from Emp Grp PF Reptiio ) To overcome these bypes op problems 19 oracie VE One given with & Ment OF pwiticoumn - 80 thak the. Companion 78 Perpemed uathh depart tren % Salony wo Seteck ¥ From emp Where (Replno, Sas) IW ew ules 7 (Seed Nepln, MAX CSa) From invey Cnp PY denne) Coreete) “This ~fype op mutttcoumn Grnparisuns ave. rel Eyepetced ‘Nn Sak aener. So ue med Yo Aadlopt- our own togfe Ww Setting the Yesuil:8- Sqn Select ¥ From emp Where Depts + sat in (eojeck epkno + NaxC2at) From Emp Group BY depine) > Wile a fo gt the celatig of the Empiyjee whoa 48 the most Senor in the orgprtzxalton Select + from ENP Where Uivedoke 2 (Seteak Nin¢ Htvadake) From emp) tay Pwvite a eucy to ger the claiis of the Eempiayee Sn tach depastrment 2e\> Detect * Fyom Emp whee ~ hiredate a matn(atvedaker From ae ca ceptno) 3 Thus bled mark Benker Co-Rralaled lo _Guevies: Mong. “euctios con be evaluated ‘y exccoking the sub avon Once and aaksblaking he resulting, wawes %n to tHe here Cloute of the oykor Query: TE auotes Mok Snaude a coveleated bavory Ceapabiog Salooaesp, the aubqyery lepends He ouker apery Fer ea values: TRiA means Yhoe the subgey Crecubedt vepeatedily. -Hhok- entght be edladled y the sabe => Ide a Query to get the ddlatis of the Bmpioyee. who 18 Casing the highest: Salary Yn the dvgantsabion. Sait- Select x fom Emp & Where o= (Sereck count (2a) From Emp m Where m- Soh 7 E308) “In the above cute isk the aber quer exeote and. then the Snnor apey execuke compart with the value oukey my ie te wth counk nop oukey query Salaries ave ery Syeakoy than Ynney Salayies» on Ye , “ Eenpno Sat _Empno Sol ~ Boon -——70 - too) 5000 \oo\ \b0 2 14000 joo 2 yoo —7) a Beno loo 3 3900 —73 loo Re yoo y ooo —? } 4004 — \o05 35007 4 005 seo 006 3000 —7 5 \o0 6 oot yecord Ayer Pog a comparison 13 Keep the hol eratching wt op which fe Nothing bub here Condi he Inighea- salsy Smpiayee cdlotig- 80 %n Ahfs process F we “use VY An place of “0 HE UA Give the gt higheat- Salaried mpage detail ‘ > The Pebem what we face In the okeve cxecukion 1 Sp hee ove dipiicako veda vonking — Saquerne cath Nok loo paper, t. an the dkove case Tr te conrk to get the ord hghest Fateny ve can noe ure 2 lboecanses2’ 1% mn’ a =? To evemome the pwhiem yeurite the code as Fonocotng Seieck » fom Emp & Whee 0 = Seteck Cook (Aiakinct Saf) Fon Enp oy Uikere m-Say > ESal . D) M ee % Empno, Sal Empno Sd eo) 3880 ipo) B00 -—7 0 lore Gove joo2, = 400 —7 J ee S003 = 3800 1003, bo = too 4ooo Vooy 4000 | “\005) 3500 \o05 abo > 3 1006 3000 1006 Bevo —>Y ~? Nofhe a query fo gh the cblotis of the department Sn uohich EmPoyee9 Were taortog Seteck % Fiven Genk there Reptno In ( Select Bishnd- Repkno from Emp ) ~ ey uaing Grveioked Sub query Sate ¥ fom Dept 9 where Exiaks Sel eak Depkno From Emp & Wheve B Doptnn « D-eptno ) Exe ( ) “Rous yo Tue Rowseo False Nok euriea ( Write © Query to get Sho iiak of Sub-ovdinake under them Zoi — Seieck * FrOM Emp - Where Empno Fo ( Seieck Aiskinck wign From Emp) mpayee uo have. So\ck + from Emp & Where Ex 38 ( Seieck -* From Emp m where Me mgn = B+ -Empno ~ Co-neiated Subquery esi be Consumo yoo OF the toner HOY * yo) & the suber 9f2"f-B0, ip there 18 09 chance. move time Ato exeake leeconte eres Je4eg Compares with eery uge a “conelaked aubpery” ony ore tutng a “saben Thate aye wed # etotugap tea cleda oa mnie robles wo O fom oe > Teing Can be used in afte $l in “a 7 > Equi — Toba => hon shu — johns 2 Suh join => Cartesion Join > outer join - Ty foo eye mie tolled o7e Gurmbabvecd Equs — Joins : er fo Equality Condition Unocal fr o4e Spunk faba Q: wate Guing +0 gt the rpetching secs fom cup aud “Dept Febls- . Seket E> énpno, & Evame, Te, € Migr, € Hiredele E-Sar, & Comm, € Deptno, D- Depino, D:Drame, f®- foc) D-Loc Fajen “ENP E, Dept D+ Loker. E> Deptno = D- Peptro Th tHe above Cate fr whu get Ha. zecilds fowm the LAB Ha pu tables Tk tot He DEPE® madcles qutie Hee fio tabls, So Ft wtilvst optrie He fnpifmabion of- DePt ve’ Lo’ form Dept tol. Lecame @ Hatch is nat avetlole. fn Emp table NR The abwe wah Ope Hee late fotwm Hae jor . bith tbe tw tbls ob Hea Synlas Bp BStitabe 6 vat GQ AMS! Standard» To wunite jolt in ANST Stanton] We ape gin cutth thpe option =D Boake, d => Inner jolw > Con Jota = outer Join Loner_join Using “Taney join” we Con Fmplements eQui- join , won equi —Jjeem as wx as Self Join alto Equi — join in ANS Stounclard :- — == Sekck F eupne, €erame, & Job, Evmgn. & Hivedote, E Sol, E- Corman , E Depts, D- Deptno, De Drame, d+ Loc Fojom EXPE Inner Join / Condy) join Det D pn E Deptho= D- Dept ing Note! in Anist Stanalorch -fo waite a Jota Stabbed pe compli ue the Join Key weils Setween me Os He tables” jabich ging clescriptivenes aud atre to Join tte tole, with He Grditiong Me ue Hen “on? koypat bu pat yrleme” Yosf2ois Prado Leading dob. From cnullspte tabies uaing Sq) TE Condition: ey using an &qptfotn, te Can combine the dalo oF any nmba oF Lobes provided a Lhese abies eonkains QQ” Cammon Gawnnn _“Depheatis “comments Depkno 40 20 30 Wik a euery to. Soin the Hyee febies Emp, Nepk 4 Rope eto s. Davn- Non Selec: EEmpno, Etname, EvTob, E-mgy, EHnedake, &-S00, E-Comm, EDeptno, A+Boame, Mtoe, BA td, QO. Pormments From Emp) Rept: D, Rept Deas Po. Whee Derkno = Q- Heptno cand Dfepkno = BX+ Septno Arst - Storroud Toft Seleck EsEmpno, E-Grame, Ertob, Emgy, E> bivedate, san, E-comm, E-Reptn, D-Qname, \)- Lec, Q9-%d, HD comments Fiom Emp & “Loney Tol Aepk A on&Heptno =D: Repro Thner ih DPLAAHs 0 DWGepkno = YH epee » Non-tqpi coins Tp we fen Lobes with any CondiHon otha — than Sally cond Lion we con SE ag! & Won - Equi “cin Satlgyadls Grade Losal Had \ \3e0-00 \ 300-00 2 \So1- 60 100-00 3 Q401-00 3500°00 4 Bbo1-00 5000 » 00 | 5 5o0|-00 $ooo -00 bhike @ aucy to get Ho doko Feorn Emp ond Sal gade tebies by dis pioyng the grade fF the employer basting” on the alory- Sor- Non -cangi “Tote: , Select E+ Empno, GEname, E-Tob, Eso, & Cradle, srosal, S-Hisal, Pom Emp E, Salgiade & taheve Ea Getwee S-Losod ond sisal Anst_skandaid cin: Select —E-tmpno, Etnomme, GTah, eal, S-Gvode , Gevisal porn Emp € YanevsoIn Salgade S on eo! Belaeon Selosal and ShiSad soso! , > Witbe o uexy to Geb tho dala pom Emp, Bee ead Dallgvade elo 128 + Sott- (Select Eimpr, Etname, Etob, eect, A Bierico, 9-8name, Bel grokat, SHIA pan Dec, s.onades"Fiom Emp E ‘inney shot E-Deekr0 i a Beploo Empno, ErEnarne, E-Job, E-Sal 7 QRLepkn, HGname, Deloc, S-Grade, S+Loso9, SHtsal Bom Emp, Sept 9 Sab grode S phere E- Replno= O-Seplne oind egal Bokooon S-Lpaal and SeHigal Anst glawdord thin: Ans SS Etinpy Ethame, ETob, Esl, Qepbno, HeAnamne, PlLoe, sGyode, S.Lo90l, $-Hisal From Empe nser Tio Depk 9 on E Bepino = D-epkno Toner Join Solgrade on Egep Retwee s-lo9a2 ond Sehsfood SE Joins “ining a table to Tkoaip for Jetting the yeauts ts a Suip tein >\htke 0 auoy to get the aang of. the Smpayee Bho hore Stlb-evdinakes ondey them eal a Tin Solr Non angi Zain: Saeck Diskin EsEmpno, En EBogno » Fiom Emp &7 Emp where G Empno = Mgy An standard “kin Saleck alloc E Empn, Fm Emp € Toney coin EP 00 BEmpm =r MA ame, EeTob, Bead, BEname, Eh, Esod, ERepbno, M e \eo\ OU) oo} Av) o yoo? loo! oor. Yeo) 100], \o03 hoo) * too 3 re Ea vooy ip Vooy 'o Lv 005 Aowh x 008 oy sees eee \oot 1008 Garresran (on CRoge Ton: TIE luo or riove Lables ave combined «ith each othey tfthout Gey condilfon Ue colt tt a3 O Caiteston Co) Q cross Tine Hove Zech wo Of the Fisk table goes and “Fotos catth Bach 1010 OF the Gecond boble. 80 ip tho irk Jobie as m yous and the Second Jahie ad 0 ws: The askpol” win be Leman) ows Camkeston product) + Non-cAwsi “Soto Seled » From Emp E, Dept O + psi _skondoyd ain Seleck ¥ rom Emp E ewes Trin Dept © \e No ING TM 2 90 Select v From fmp & Dept % Repl elas s Q- ¥n81 Standayd Too Mp Sdeck x Prom Emp Coss Dept © Cross ofp not Retans 00 Oovrer gown “Tk 9s an extension for the fapt-soin that fe fn oF equ Ton Condition cae wi he getting the matching tnfamake Fiom the Jebies UBed in the Gees Whee ag ip & Yecuidejop 0 Lobie deestt ‘have ‘he matching doka tn the Other Jolie Thal veooda) usin ot be yekewied TTA case of an aber 7p Aust Me ow Sqpi-Toin oti Vekertve —Lhe rmakching lola. fom att the tables &9 Le a3 the unmaldhel dala algo hove the unmakched ola Con be -peant tn the LHS table to RHs table Co) beth babies also- \oo } \o to soe {oo 2, to 1003 do—> ae oe Yoo 4 20 \oo5 30 ~——_+> 30 eo 6 Bo : ; * ho an Conmebched (00+ 5o cto) Conrsatohed doko Oulte “eins ove of Hwee types: le Lopt oulor “Iofin 2 ~Kelesives Lhe matohing data From beth . 26 Righle ov Je tobies 08 wer ag unmatched doko. Por Lork hand Side lable Be Tigh ookey_Zofns “Relevives the makchin cha. fsor, bob! Ye obleg as wet @3 onmabched doka Fear ight hand ede tebie- fon ole sgn “Roleities the emolched aka. Fsom loth -Hye Jobies pus Motched doko from L+HeS toies plus urtmabched doka sor PWS “tables” ABo- Legh aubes Tein: eg: Sdleck GEmpn, ErEname, E-Tob, ENG e-pivedole, Egat, Become » E-Deptro, 9:OAMe, BLoc *Fromn Cexp-tept © Let abey sity Dp B on EOoplno =D Depin? Emp € ay Sejeck Ebmpro, E-Ename, E Job, mgr) EsHhedake, Excal, E-comeny, GHepiro, DRelno, Aon, DLC fim Emp E Right oukey Rept A on SRepiNO =AeTGiiro~ Fan okey Tom eee aie E-mpno, E Enamne, ETc, Ermgy eunedake, S04, Bosrnm, Hepino, Oeptno, HHname DLoe From emp € Pott okey Dept NH on & Bepkne = D+ Reptno- plovjns Sido > livile a auay +o get a mokding ond Sead doko Feo) the abies Simp, Dept, Ree etosis and Qadgrode: SA Select EsEmpno, ErEname, Elob, E-Sal, EaBophan, DReplr, Depnume, Woe, HSSd, W-curmment 8, shade, Ansel, Swede fiom Emp © Aight suber Jol Reps A On E-Bertno = Q-Aepkno - mer ToiN ep Hebajig BO ON PeAeptno = HOMeptno Nos “Tn the abo Query, We aie rot rebvving the Soposmakion Prom, sallgverde cloe- TP we Want + get the. dake. fon thot tebie ale ‘th matched and smmabched adba tho Suc mut bo ag Fonoing. See Selec E-Einpno, E-Eaame, Tob» & Sal, 8-Gyade, D-Depkno, WOname, Detoc, ANsd, YD-commenb* Bom sdlgade S =tanor ‘orn EMP E ‘wm Eoad “Between SeLosal and s His@ Right ouker sein Dep 9 on SrBeptno= H-Reprro Laney Tein DeplOetaj 14 0 09 B-Reptno = AA: Repro “eo 3 etatis ] sine “Right oubey a Ten re aa 7 Repl —> Repl Shiatis —> satgrade 4» Saye Te 3 On bie Which can be creaked as an “alitas” For any object he tobie, view, "procedive, -fonotfon ac Spr Qeoke Synonym Eg Creole Syranym for Emp Selec ¥ fom & eaweoes “Ris 9 a new object Sekuoduced 8m aor 2q4 Senet Sumer? Dewer goig used For Jenova Q Sequence OF Naluoss acewftng to —the Spectpreatfons estth whieh the Sequerce 43 onaled. Sequcnce w% hie of Sprerabing ally are ovdey “te by “provding a Yeskoit Cod) ope option hihen “Pk Yeaches the max. value Ske eden y 7 Seqpences ave Ak asecctaed wth Spectpre —tdhieg « - rumeve Vaues °q Creare Seewsnce ] IF “ThoreenT By | [fnnvae Fecunstont?]§ | {No movewne3 | [{Mwavawwe [constant] § | {No wravane§ | [Oc | {Ne cycle 3] [ fcaewe ( coostant]§ {No crone 3 | “pe poe to the type F vaue hich saad be Generated the Seqpence must be an fokeger type ony TE ows the Feroutng Aype2 Agnyink = ‘Fange ' Bile Smautint - Fange 2 Bytes Int ~ Range uy Byte? Batre — Range 8 Fee C lerautl:) Dectmnal and Nurvorte with a Seale oF O- Nobex: Begmal and wumerte when used withouk a Scale Whit ke Integer ony : Samer WiTHt CE TS the Frat value Written by the Sequance- dork value crust be a Vole \easthan oy Squad to ~the Maw Vp thon OF Sapel. so the tanunewmt Value of the ce. The ckgost Shot vale Por a new Sequence 12 MRgmam Valuc —foy ascending Seequece and Maxima Ne fw clescerchinge Sequence: “Ancrerent By: stk ia the votue used fer Increment oY decement for the sett Value being gencvabed by the i Sequence er och quan 4 TTF the “inovernent 18 negplve volue tt 12 a daxrdrg Sajpere Ole, Wee % ts Sserctog “The depwit Tncrernmnt $s 1 and Cannck be Specipted a+ \owey Minvawe + Seothies the , bauned for the eequance Sbfeck - “Rie degoul min vawe Foy Q new Sequence iz Nhe mtnimi, value oF the dakatype uhich 19 ew fo/ the “Hogot and Negglive Pormbey fo al othe dokobypes Maxvawe; (Restart [wit ¢constank wy [ancrenenr By sonstant7] [Eminvatug thke enews table> From Kevauses) “7 Selec + toky New- Emp orn Erop ~ 8eleck EEmpno, EEname, BIpb, ESA, D-Deplno, PArame, BL, 90-814, 09 ommente tao EmpAelelia From EmpC “Grey Toin Dept © on & Hepkno= p-Deptno They Join Depkelaiis 00 on O Nepino = Hoe ptno 3 i brani tolse by copying the slckure. Select 4 into Blank—EmP + From Emp there b= 2. Baek a Grom Bmk-Bap eh a ~fincton_ vahtie creaking Frown _Exithing “bre ple Teerksty (dobo-Lype [: seed yincveroanl]) a8 colname ot with aoa bolle. dons Function con be used ony tn a Sele 89 Sinko eke Clause to inet an Ferg c\ernn fake Cee tebe Bt “Select Tdonkin (int, 1,0 as zd, Empne,Ename, gol, Comm, “Sak+ 1SNvIr Ccomm, 0) as “Teka! gay “Eto Sal_Emp fiom Emp seus ot algo o cebobaae objec uch rhe @ tobe bub hegeod ble con either ami th a8 a toghoa oy vital? Jobie Because tt dhesb+ hae any Physical txlslance oye Creare WEW Cteoiumn 6 ---0I) J Diem G-- ay) CAS. Select — slakerent [WITH CHECK OpTion] NwitnLabtyi bube »: ~ Encryption ~ SCHENABINDING, hen Ceropaved 48th tole we tae he farang dfferenccs bodacen @ kabie and yew r Tale. 1 phystood Where as veo £3 Lenrcod. 2 “Take 33 an Independent object @hae ag view 13 a dept hfe Fak te a view depends a a. table (0 bobies Bom which Tb 48 leeding the date. , S When a new kabie 4a Cleckad form an existing toble the news ond old kokies one Yndepondent of on 138 4he changes oF ore tabie “Al nok, a vfs Snte the hoy tobie phae as TF % Vio owe - baste on a bobie any charges thot eve pevrrern whe ee vepieds, a the vey ond ony changes Wiypomned on che Yew repedx tno the tele o187° <4 Crake view Soleg_view ag Select * From Em p ‘Where Weploo = (clock Beto fran Sept Wheve— name -\ga1ee) Any Sed Shaberrent that can Yelveve ‘fornokion From table Co -lebies @n be used ir orabing 6 Yiews age Oeing a Wew by S pecitying Coumn Hames’ Creake view SalBekails_ Views Cano, Tob, GalSom) AS Select Reptno, Toh, suen(sal) From Emp Gop ®y Reptno, Tob + We camo use an Spider by! Clause $9 a Sadek etdérenl op Crake veew aul: ff shoe 88 @ stop clase to the Bye dicey BY Se valid a Create view. Emp. ase cia Selec x Fron Emp oydev = Sal Uesgod'el Create view Kmp—ajee as Select “opis ¥ From Enp = odor by oo ivottd Creag O_Vie2 Finn _sivlbipie tables Creole view Emp Dept oa Satecl -EXmpne . E-Ename. E-Tob, Ea, O-Replno ,OAname, DLoa Fromm Emp E ney Jun Dept A on E Deo = Deplno- Benepirs oF A vicw* Veldhen we wont to provtde access to 0 Subsot of doko. ~Fiom the daisie we can then cvaoke a vito wrth the Neoutved dota and ere “Pemrtssions on hat view So th @e con erage Soul ly 7 & When we wonk to aces cola fron a tebie co” ctolies by uiilling Comper Quevies alucys %M Buh ceed ‘fF We dieate Views basing on the Quevies uk can dey suey on te Vrewa, oy without ed Complexe Ruenie Hire. S~ Veo 89 a logeat tabie, bak whok tt Slues Fehesnat) ° °, creakin ~ 1 deck slates rot %8 used fr oak Views So thol, whenevey a user “Porsims ont : . the Vieo tke Soteat Insert, vpdake o delete Fokesnany the veux, yor Shoe Ofeabims 09 a lable. Simply Speaxing %% ade ao a trtovpace bekson ho dala Ppovider Chable) nd the dole ansumer C User): abie <————_- View: $US Pek a . Dalg ‘ “povide’] Saley [ert Face \oosiis Wed Metadata, lobieg:- These ai babies whfch atoves Moladata. Cate alsa: data) under them in the Meladata lables ave Redepined system bakes Where te can ony query on Yebvive the daka, From those “Labie but codt Manuptale Me dla ‘ Ww Y9_ahiocks* Tht table containg the §nformakion oF £0ch and every cbf te craked undey Hak chtatslee -Like Lobos Laystern on users], views, conabvatnts, Seqpences, ayponyn ole We can Find ouk tohak type oF objet TL fS ule con male Ue OF the “xkype” coum OF the table Seleck « From sipobjeck where -abype =U! [upertoble “hype wuueg:- 3% Sypkem Table U4 UseY Table Vv i view PK» Trimory Key ves unique ¢ + check Ft Feveign key Qo* en ON op salad prndure Bn: forckion Calurnn 3 - =the contains the ctnpermatton OF each and ever! Cournn te oatectaked ustth och ond Every table oY view Selec 4 From syScoumn Where 1D= object —1d Cem p)e. =- Geta the commns of Emptable- Syscornments ;- “THis conteing the tngormakion of views and oheor Conskyainks Where we Find a coma tert which contoina the Qpery used in the eveckion op O view on Lhe conditon Se appiied For a check Consbiofnks - . Eq:- Sated- Te From Syseommenks Where {d= objeck—td (Soles view) Geta the bexk associated with ealelvie view COs sigtcation - cA) 1) Bimpe Views and 8) Complex vFen0S » B) Oupdalobe views Grd) Non-vpdokable views 1) SaMpve View ~§ Comprex WEL: =>ca viow sohich 18 areoted basing on the Columns of a gingie bobie ts Know ag a ahrpte dale £8 Jereate View view) a2 Seaeck Empno, Ename, Toh, Dou, Keptno Pom Emp 2) Croake Viewd vfow2 aS Seleck % From Hep - FA View Ve created basing on multiple bolles Couns #8 & Complex view: Zq:- creole view View3 a8 Select Eimpno, EsEname, E-Sa, B-Gyade, oL0gar, §-Hisal From Emp e InnervJora Saigrade 9 on E-Sag Belween S-LoBal and S+Hiaol. — — CA view which 13 eveated \oatng on @ angle table to at90 be considered 08 a Complex view prov? ded - aR the Opery Conkatn ny oF The Folowing : 5 Piskinck, Ag gregak Funekion, Grove By ewvse, Vavirx Clowse, Cateuoled cowmng aad Sek operabers 291) cveoke view View) 09 Select Peptno, gom( 901) as sagem From Emp Enpop8y “PepEno ¥ Com plen com pier view) 5 View 2) Create view views aS Seleck job From Emp Wheve Repeno= 20 “Intersect Seleck job From Emp -Wheve <> UPOATABLE AND Non-LPPATABLE VIEW CA View which onows manipolakton bo the date gesocdted ath the view we caned 4 ond if ik docadt aniow maripolakions # view View —> Bi derouit: a the coins of a simple babe ave feo and complex ie ave Non-updatabie Noke: We can updake cmpiex wews based on mulkfpie abies bub nt ari the coumns we can update only cowmn assccfated wikh one Lobie + With check option Tp ak an a view 1% creaked by on Goat where condilfen takes on TF any rasépolakion ore performed on hak View agoinat the Where Condition alin those changes are. Accepted Te test thre create a vfew 8 Fotesing- egt creake View Finance —view As Seieck 4 Brom emp where Deplno=80 “In the above cave the view 1a creaked associating with ae Cordition & deptno cag) buk if we obi Layrag lo rnget @ yecord bho violates euy Where dondition that operation gets Performed te Troptno 30 Insert Tako ~Finance-vtew (Empne, Enare, Tob, Sal) Deptr®? Nawesd (i016, tAbc’, tmanagey’, 4.500, 40) ~>TE we wank bo vesbick ony pai operations on the view Ggeingl the Where condition we need 4 add the 4 tot th Chocks option’ ether at ‘the me of creaking the view oy We 00 add that Option ky altering the view q:- Aker view Finance.view as geleck * From Emp Where Deptno<30 With check option. Tsert nto Prnance-vrew ( Empno, EName, Tob, 9al, Deptno) * Vatwes (i01a, ‘ABC, Ceiers!, Roo, 4o) - Now the above Statement execubion Fo) 0% the Where, Condition of the view io vioabing- 5 Wtkh Enevyption:. ater crealing a view we Can cheokouk the obatement we hare yekwn~ For cveakin the viewundeY Lhok the text Column oF ayscoromnent lable, ub por 24 Seantty reason TF we donk want to digcloged thak {Information to anyone we can hide tt hoy 9ing © wilh Encryption option either while creating the view oy alkering. the view: Eq: ARey view Pnance-view Viteh Enewyption AS . Select ¥ From Emp Where neptno=30 With checkoptior) —> Now tf we vertFy text him under the gyacormments Jobies I displays Not in the piace op creake View kobement - eq actect Text From Sy8comment 8 Where 1d = object -Id (\ Finance - View ) a) con we drop a table that has dependent, views 00 1k? Ans:- Yes we can dvop a kobie even ‘F any dependent views ‘aye asgocatted with tb, bob the Views Oe Gseociaked with fe, ~ yk the views” whit not be dyoped- They win ke ati exiting fn the database onity with the status ag inactive object and a these views become active ond Stove Fundtoningy Pevided the tobe fs reeaked ase Jalmy SCHEMABINEING: hi Jo [2013 AY ae ——— TE a view $3 crecked by vaing +the ablvikute Yachemabint Lae “conn yop! &” Ualkey the table eaiumns” ©n uhteh View $8 deperclent - €9.~ Create view movkebing - EMP Wilh echemawindin . rag Saieck Sno, eae, ob, gq}, Bepkno From clhorEmp Where Peptno =!0 > artery creaking Jhe View we Cannst dyop the Emp Labie oby Oke Any corumns thok are epecipied 8m the view. a When we csont ty ase the Schoo. binding option TESS msl: ko Specipy each ond every eowrnn ame th the Seieck Sakemeds lout cannot use Sx! > While using the Schema banding ofeton the boble name. must be we with the owner Same 1S dbo. Which Lol tho cunent usey 19 only the econey of the toble: Nokes-Tp veqptred we can ude the wth Enowypton ond wth Sderot option ot the Same Hme. Zqi-iey View Movkcing Emp With Eneyplten , actoma stndin CAS Soleck expno, Ename, Tob, sol, Repkno From dbo: Emp whee Reptno =10 How Roka 3 shored onder a Aakowase? Sah Sener elyee dolo tnt urdey daka pages, hhere a dokapage 12 a mina \olfon For Skoving oF the inpoinatfon . A dotogage wt te hong a Stxe of BKE and Bey s dota 3 aya Skoved onder @ logfeal container Known 0% an UW eitend? >If an the detapage 4) an erbend axe ehied Foy skutni New dala Sq4 Sewer eats a new eitond utth g dakapages At o Hme. & Rew_wfn the database engine vekvives the ingoymakton From “a kabie: Whenevey the dakakase engine want do vetvive the Angormakion Fromm the Hdhie Tk whl Odopk too dippoxenk mechani Gy Seavehing the daka. —> Fon page axan — > Tndex 8000 —> In the FRal case Sq) Sewer taf Search .For the Yequtyed Angormokion fo each ond every Page to eonect the Information. Sa,ip the table has move Yous $b ail be Lorstog lok of Hime poy scaring aut the dota: 90 tt 73 0 Lime consuming ‘Process - > Fn the Second case Sy1 Sewer wTthoul searching Into och and every dokopage Por relviving the Inpormakton ft taf moke use of on Index For Velviving +he inpormabion, Whore an finder $9 @ pointer bo the Inpormation what we ave Yobvive Which @on Yeduce the disix To opevotfoN Baad the Hme, Buk Tp we wont +o use index scan Foy Searching the daka Fivat the @ndex has to be eyeated. Spear ~ Cyeoke Contqae} [austored |non ~ ctustoved } , Index index Name >On ) ‘Nokes- Whenever an tndex %8 cyeaked on & Cokin oY Coons OF a Lobie fnkeynany an index bobble Geta Created maintaining “the Tnpoimakion op a cow on ubich the Index fs -Ceaked a3 uri as odkess Cpotntor lo the Yow Cres pending to & Coin) Inder “Tabie a Address Ctosrerep sNpsr:-T this caBe the owangement of the doko tn Lhe index Lobie wt be Same a9 anangement of the dota op actual babie. €q+-"The Index. we pind %n tha shave of a book Nolo :-“Inderes ws omange ‘the Snpormation unde them ky Odepeing a Skuckve wed Bice Sbudue. ~> Suppose fp a Cuskered tndox %s erated on the Smmployes No-coumn of Emp table: fntesnany we WH Bind the tr ymation as | 7 index. Non Ctusreren mex: Tih 4his case the omongement oF dota 4p the Sndex page ov table Uh be dipfovont: fvom the awo.ngement oF In actual table Eg:-The Index we pind tn the end oF the book: Boppese o nonciustercd ndex 13 creaked on Ename cowmn OF Emp Eabie the artangement of the daka wii be ad Forewing “Index Addvess tunique index: “ER Lhe Index 19 croaked by vsing “untape? opton —that crmn 09 which the fndex 12 eveoked win oD anew dupticate vawes be TE forks 03 @unrye canstyatns* Unique contain: con bbe Sither unique clustered oY Usique. con-Custered a8o. Nolet Whtle creating On Index ‘f Cuskoed oy non-ctusbered %, Nek gpecteted Bepauit 1a Non-clustoyed: Gr Woo many Inderes a table con hove? an = We can Cyeake OL maximum OF 50 indexes fn which onitp One Can le ciugkeel And Yermdfntng ON ave Nonclualered Me Snderes Creoked Trpictay 04 Shou be create them Expuici by. When ever we Impose & pYimovy Key conskyaint on a Loble Coty inkemnany 0. unique clustered) nde gets “Created . Wheve 38 th oO Onfqpe consbafnt fs impose on any Caemn iokornoiig akuntgue Non ewatered” Tndex gets cveated. - eat ‘indexes on Emptabie:~ AS the Empno cowmn is Imposed with a pk Tk whi Conkdin Q unique cluatored *olex ‘enpircthiy Apart From thak we can Cfeake any umber ef Aonclaskored Indexes on the table a3 Porteatng + eg: cyooke Noncludtered Index Ename~ind on Emp (Ename) “eyeoke index Sar-ind on Emp( Sal) 4: Create bole Student Cid ink, Sname Yorchayi60)) eyeake ‘enfope Cualaed Index Std Ind 09 Skudent cai 4) Note ta the above cose the teden tof nok provide the ‘Grettonattty OF ‘Primary Key For Std cowmn bub skin we ett gph tho ~Fonctionatiity e nique conalratol:+ \acfor]eo GiJoy When Sar_Sewer uses_sindeveo:- Soisewey Uses tnderes of abdbie provided the Seleck oY uptake ov clacke Skokement Centotined where” eorditfon in them ond move over the where condition cow most be a tndexed Column Tp. the gaicct stolernent conkdin an tovder ky” Clavae O80 Sndexes wit) VSe- Nokes When Sq2senor 12 eeonching For snpevmation onder Uhe dolabase Frat tt verpigs the best cxeaybton plan FOV Yelatving the Jako, and uses thot pron which can be eithey @ fon page Seen oy on Ander Seon AB ear Seleck x From Emp X Soe % From Emp Where Empno= 4003 a Selec + From Emp where Ename= 'scott Seleck ¥ From Enp Whee Sal 73000 “ Selec -» From Ernp where Soupde Jobe menace’ A geleck x Fon Emp Wheve Soundex CEname )= Source (‘Senyto) ajeck * YM EMP order By Sal Desc x When Shaid we exate “inderes on _0. Tobie We need bo eveate index on & kchie covmns provided thos e Cowmns Ove Preqvertay used wm Vwheve condition" oY “oydey By clause? > Tp 18 Nok advtced Creaking o fndex on each and Every Common) ecauee more mambo OF Indexes con degrade the Performance OF datebose aso becwse every modt pic aston we mare an the data shovid ‘be Yepiecked Inka aul the Ander Labies: “Tiensaction Conksor. Language :- (rev A “Wongackion fg a unit OF work oy Sd oF Stobement Cinsevk update & deteke) whic should be execubed 8 One ontb ; The We of bonsebion tens that either an the Stabemenbs 4m the hangackion Shovid be ection guaceepuiiy oF Nor Of thoge ghotement ‘to be execbed To rmonage -Wangaction we eve. piotded \atth Evansaction Conkvol Language, thab provides commands like comet “Tyangaction " Rottloac “Trangoction”, “ save Wangaction Cc mini “Wangctions Monks the end of &@ earepui bangection Sainich uti mare av dake modiptoations Pevpeimed Since the SLAVE OF the Lransackion permanent Udey the table and Frees the Yesances eid by the -hansackion “Rolbock “Wangackions He win bying Loaok an impr ck or Cxpiich- Woneaduon to the. kesfning of the Erensectfon ev ename ences om dato. motigcolien made pm resonces held by the brangact tay Sqt Sewey provides oY Suppats 3 dipparent models of banadion ‘oruke commit bransaction mode (depauit’] 2) nrmpicit Wanmckion node 3) Biprsk “Rartaderon mncse Ark Comenit “Rongndion- ln hg make Pragamme:s Ove nok Yeaponsible for begin Q bransackion Oy ending oO laanaadinn when ever we Perfor, YY erkeake ONY PHL Seakerrenk= Soy Sevvey ony 7 Beg & bansackion and Enda the “dransgckion ith OC Comme % Rollback Se, Prsanmes decal have, ang conkkve) on Yorn Imp wick — Lyaneactton noode:- Un ths mode Sok Sewer wf] begin ® bansackton iempcrey bepore evecubfon any PHL Skokement- And developera aye “esponsibility to end the ansaction wikh a Commit oY “Roltleoek - once & kyangatkion ends aubomaticoriy Q new braneacio Skat > use Ampitctt -Hansackion - mode Nead ko exptcitsy- execute the Foneutng command . Sek TLinpct b- TWongoakion (onforr) “Ep the Property vaue 12 ack as on TE coke Yhe coneection Sinko Amprcit Lvongaction male and if 7b is OFF vetoing the connection +o auto cammtt yangaction mode Sad Tmpictt —Twaneackon on update Emp ect 20) = Boo Where Empno=!o72 Comme of “Reilhock updoke Emp Seb aot = Gooo Where Empno 1902 Comm: ov Rollback Expiter “Wonsastion Mode = In ths mode Programmer Jo only responsible Fev bogioning he Hensockion and ending the “trananotion Tw becfin ae bonsackion we Mn vee ° Fagin Fangobion / eldemerk and End te etthey with @ “Commie oF Rollboox = i) “Wangectior opdate Erp acl sal= boo khere Emprozloo! Corn oY “Rollback iN “Wansaction Update Emp get 8a) = Boe Nheve Bmpr =1002— Commit oy “Roilleack- ole Salado Save Transaction Thtg %3 uded Foy hiding con breaker brangackion nko mulipie untl - 20 that we eat have @ chance oF ‘orlbaoxing a byansackion vpto wht & ocdlion: When a user Ses a cove pomtt within a byonsaction the Save. Pent degines a toenltor bo which a bronsactton’nYeluin fF part oF Lhe lsonsackion %8 cndtbionany cancelied- TE 0 bvansaction 78 vortedbaok to & Save poinb, I most procee d “to cemnpieton of ~the —Honsackion with o commit Statenent cov) Nottlback Skakement “Regio Transaction Updoke Emp Se S0l= B00 Where Empno =loo! Uplate Emp ack Sa 4 Save. Wonsacion 92 Upliko. inp Sct sai = 3600 here Bnpno= lies Updo Emp ab ett = Sov there Eimpno=l006- Ti the cbse case ke Gre breaxng the tonsackfon fobo eo urls. 0 we have 0 chanee of Yorbooking he Sansocion etthey compile So Yhab att the Gx ekabemnls Ada vokooied Co Youbock upto the Save pas 81-66, Hol the lok 4 Skakement:s gobs yonbaered ond Mon commit the -fivek 2 Goi) vollaci ofko Savepdink- . Sard conf: He fat he We end the shoe shengadion we con use ony of the Forastng Skokement- “Faibock -- Wer end the -honsadion. lov) “Rottbeck Trondackion 81 — - Win nok end the +raneactiog Comrrft-—— Laity end the -hansackion- Cor) “Pallas “Transaction 8= ~ Win nok end the Wansaction Commik- = ath end The “Wonsackion: We hove =o Chance of Yontoooksing upto a Save point but Can nevey Cort upto Pave point. Dimen9 yess CAs we oe awne thot a view 7% alagcal hobic pal is URN nok shoe ony cata. tm Tk- Whok % atoves 43 cy tho goiect Slotoment usa fr Cealing the view: So thee thanaioy ne on aed, the ved wi! Takes sthe_ cha fam the abe ord -proserk usb pho 4s arlotes ANY Caleidled couimns tn tk aye cag corms $9 te sthenevei we oe a the Veco ait the Clleuwodioos “ Lions 40 bo Pevpoy eo Hme. Go tf theve ae MoIe Number fF was order be. the “proces whit kee Hme Conrurtingy To overtone thts “pabiem we AN make te Rew Qs Phprea) 44 coping o untgpe custered §odex on Het Mew: . eating QQ unt ciutlead Spe ON View Improves Soy emee of a view because now the view fe, Stodll 9 chlakoxe %! the some wy a fahe 7 erorect “What ts ik bocome s a hysicol. TE we un 4o ceale a Sndoxod Veo wo = the ~Fotocatng veakyickions : > The View mud be a Schema btinded View > The view shovid omputatony stolowy Coonk BIg | aggregate fonekron ‘nal > I “the agpegate -furckons are coeectale) with ONG a Cowmns IP QF dt Gaumn ALiads Non Vaiue in 3k: we sho! aesedate 3k tstth envi fundton: Sa Croke View Satelati Ath ccherraBnding A: Selec Popkno , ale | C*) bs Emp cont, Suey ESoH01 (sau, 01) AS ua Sum Bon bo. “Emp Crop By Deptro- As ‘of non, the Vieo % Laptcal +o make % physfeos we need +o clogine a Sndex on he view a8 Fonoeziing - Bu Croke unique cuuskered tndax galdeLatie_ ind ' 80 SdlRdalig G@eplro). Noes tz the abe mae aploy depts ‘henumes “pug, bob Jabie ma a the. index pace a mmadiptcalins “porpoerrasd on “he View: SMe con drop an Sndex tha 1% Crealed on a lobe ot view 05 fontag ae wp Thdex awe de © Drop Thdex name tad on Em \ ne i vi Drop sthdes SelHaald ind OM Soharbaits fy WP “WDRopeng AW Then: int / “PL/sav (ov) JSaL: *Vocalutel Lan oge / se. Cov) Wangack Sal : ‘The Sel Language that we ae wating 484i now has Feo droubaoks ted oooh povide ry techont arn “Sor adop hy olep Execukion of the ande. : ath dessdi. -povfde eondtHtonal Lyanching and conditional a Stoboment to exeake the Logie. : Beak doestl povide ony Enoy handing mechanism: AT overcome the Shove “Pohems Set has been added Catth “Pracduvad Capabtiflies to provide the above features Od Yeleducod 09 “PL/Se1 lov) TBAl- : Pier 1 an obgk ogrornming whore & bloc oF Code- . : Pest Poproms ve oF two . types: 7 Anon yas “Brock - 7 BSb- “Pograma - . 4 ~ Shaed preceduyes - Sheed functions ~ Tagger 8° ath ts a breock of ede whbh fs th a Sesion ScOper popam 18 O Avoyyans Boos Srcolad ok a poi op Here. wh : it 08 - PROGRAM: shis a named buck of code thab fs Skond on a Gener, And can be execubecl any Hme From orgshere also OW eub- prgyaen can be destined in three way chad peeve ~» alued Funchon t ? Trigger: “Reanig Vodioes 8 pigar praqpoms: Bynlox- Beclove @erory CASI Kdalolype> Cotxe] G- 0] Ex:- Qeciove @>s nk Decave @ 4 More Qaerave@s vorchov(Se) , @d Rate me Aber ow variabie, Shoad be “pertxed caith @ aypnbol CAeaigining yoed +0 vaviobes: = ——— eithey a koakic. value to a variable (o) vavidbleg ol%9- tle can Assign Vead Natuoa form kobyes into Reageing skale votes ” Spl Sh @evor> = G---J From [ctouses >] eq: Sdealt @ = Ename, @d = nive dake - Bom ENP Whore Emp no = 100! “Bong Value? of voriabies: ee ee Stnlor - Pink @ tu Pint Ome ‘Viograrn + Reciare @x int % -100- Sek (x = 100 Pink @x ® Peae G@enorne vorchav(6o), @ sah Recieved) (1,2) Saeck @enamectname ,@ 900 20! From EmP whew “Empna = too} ws Paint @ gnome \ ot Prot Gad ‘ Conpiniowal Strremenits: Th ts a biex of eode, Yhak eveakes kasteg on a Condition) “Trey oe of tun ype \+ Condtionod branchin Rrandibionad tooping: TEadikonad arching, ~ IF Else If Biee —swilchease Cue inike aeleck condition gy. Looping — While oop + ’ as the ahaview %4 tke Sotteh: Sspphact:- EE scondikony Begin ~ sims End Eiser¢ € condi hon Begin ~akmts End ~~ — - Elge “9 stints End Wile a Pozom ko print the weerday on hich the eopiges 88 joined 0lt- edare @ Empno ink: Reciare @ heokAay ink Sat @ Empno = oor Select @ work toy « Sake pay (dw, HfyveRake) From Emp where Empno=@)Empno TP @ncex®ay= | Pink Sunday] Else xp (@ucok Ray =2— Punk Crmondoy) Bee sp @ 23 Print -wesday Qe te @uorory- 4 , \ Rn —Skenls Bod. a loop veqpiies 3 things fn Common \ Tevbiotzabion which sete the skating Point of the \oop- A condition hich ecta the ending ‘point oF the oor? 3° Thotakson Sch boxes bo the nevt level oF the “ee. Bither 8n euard Wecion (oy) backwoavd direction 1 20 postive Cad negpte Terokfor t Reaove Geral i -- Inibidixakion Set @k-o == endikon a Whtie (@x< 10) pe Begin Bat Ox + = | ~~ thevali on: ‘Pink Qa End “Beak slobement ender 0 !oop: We can bok the cxaskion $f O& loop by using @ break Skabormont a Reaiene Gy Tob Sel @v-0 % - Wihive (Ox< to) en Tr @x = Shea Sat Qy + =} Print Qx End Pat eae ano ep We a “prograrn For Inorementing the Sabon oF & Given Esrproyes. basing on his fob- Presthnt 4 Monagey BY. Arobaypt ey others of Declare @srrpno Int Deciave @zob vochay(se) Seb Q Empno-= 005 Seiect @ Tol Tob From Emp Where Empno= Gem pro TE @sob - pressdent! Spdoke Emp set ent + = Sol * 0.08 there Empno -@Empro Rise 2 @ eb « Innnager . Updoke Emp seb Sale = Sal 10-08 Weve rere = Qempro , Fisere @rob: Mrotayt: ‘hone Uploke Emp set Sol += Sad-x 0:06 Emnpro= @eenpro Fise @xtcl< Sather Updote Emp get Sar = Sellars Where Empno- @ Empho —_3—- a - \O"Cursor:- TEL 13 a Hernory localten Fer Storing bhe PRcouk of 0 Query which 1a designal Por stoving vemlksel® Ho 18 molipe Yoot ab a Hime. We use Hrege Cureer8 under PL/Sar Pogams For Processing mukiyow Sekck Stotement f-e, a Skokement which gets tllipe Yous OF doka ok a Hime For Paceasing MAnaein@, CA_CuRgOR: Curgoy roanegpereck vone oF Five. steps: Lael Q cursor + 44 Specteying vorfou® abbatl Q CevSoy+ Szyplox 1 Decuare cursor—riame CURSOR Lecat | Gicbai] [Foruneoonty | Soro] [smanc (pynaraic | FASTFORH ano] For