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

SQL Notes

SQL basics notes

Uploaded by

whywhohow77
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)
38 views

SQL Notes

SQL basics notes

Uploaded by

whywhohow77
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/ 12
sa (EPP Co Qraeate — creele dlakabue Addig ress Colimuf wey tal drop Rename — ALTER — charge database /gire /kit}e —> USE (achema name) ‘— DROP _ for atroppig tems &. PRP TABLE S Yarchar - chavad&* tape @ Alley (Works om dlefinttr'on Jewel) Net On date Jewel, e (cdhumn/ Table RENAM adel drmp— (enttarmne 2 metif (me reese cleans fevary® dats Safe (we deta (fr cece pile modifying moc need 9 clea ee oarengpe fT) Ne need wilt (nerves e (CeoAiz) @yeer — daTabue bbje conf a ® Funcol / ‘ CDML command) J ft, J Tasje gore i dete move only . gee er (Tasie Stecwr HED pe _ prdeve Tie phere (#) we ae He eal dats vorev® a ho n) ? =D) crmanent Glibu) eZ CA) Af lat“ Chyet, appdelé, chelelD Ger Cauercomm't HD — (thet! yeh wx commits te make porns Op tirmeky Ths is Apeetol feotive t mysar CNst ain pthev yr ) > SET qutreomm t 2 SET SOL-sArE_UPPATES =O; (if om D Rollback ; (dete cancer be ve Priveel DML command by Net ett DOL (sore mpaeld ( Trercets Jao ) p deae) D Commit 5 ( TE commit eco Permanctig, Cy SET aulfcomme ~ 13) Thom commir net rytcred D Renam Table can be done diet , ( Renoming. Column — AllBv Commanf5 VOM § — Dakabme Maregern en Softesere SOL - 1. DML Dee ten CTramacts. Control neo, Operation Vetabwe Cole, Tobie bepesye) > Crtols Detabase Nome. 5 (Semitcton rresdate. (so — core \ingem He leagsese ) Dade type 26> moo int Caced foek (n> cleo Hime Cher Varcha PVE dobiwerome 5 eee iaeliaia ars clekabaxe) D> Show Tables + (for showy tables D Dep Petobue _dotabwenone ; Dap Teble — Tablenome DP Show Datubmes 5 6 fer databsre+) =e (for THErene) BD Show cobb 49 “Tabie Name (Oe Can ase FA edsmvens) “ og = alae! Remarns (f re, PRemame “Tabu pitinanes Te nesreme + peal? publ data Ladd o Tee ( AH $ ( for tate eure) Dep Coontdng ah Weeat 2 Colin) DML commands —» Sede -(Retive dot from a Bakabssey — > Trpett _ Bpert dake = Up ale. = 53 Duds — Capace-for vetorh vemny > Lek Table — Conte! coven rene Vcr Command — Commit = permanent charpy > Ratbak — ryeptore clatabs fo original Alece Jor commt * + campeien tenes opee prantedion He Ku rT can Jaliy ret bok jet Rees pte ved data ( Gyaquir on versie User Yepel ey ase Co mtr laryeeyge? J acta > yo weere'y & merifput ekg ekeke , Abr Taser Dede ~ rent ee aw de so Series Crank privclege nome ee oe pS Cmentiphe by 9) —-), 2) Ronke + Rewke 9 Bm 4 From ( Prive = unathorred pono) ee L aaa ( aecuer > (Contr uper accesy i) gypte cpevatim = ") epee ” — tebe operation Viet, abberity che > GRANT CREATE ANY TABLE To wucernome ; creation clatabase, Feble eke. u DROP 4” won 5 ges) b TOL ( Tramaction Control Langusyey pis Lb ma Pranactiny evittin databue ge Pome — > used te exeudo Bhe Chayy rede PMS Atelimens. (Fer updele oe) Saveporn Comm) — Rettback, & Cdetabye in (Seve tranpe®or pee temborar\ oat p “~D Jopt committed Ge > Sovepsint fable crestc araiz) Rell Jeble_creds Permene: ? an “s ores trepsccon) > Commit - Auto comm MO audornatlcctty onan Sat. C fretecde, Select Commend 7 6b Der_ Cda owe fareguage ) a eed eae Arble home 5 Wri geherns Objet - Yor at yeerde — (Tyulls in confer Gultey deka from An Ferporany miley dokebye and Amfac DZ) Sllect name, cite from tblenere 5 orde pm Me a apnea end in Aoyl a 5 Coke cost A fov star 1 fron wed ee ae pane MKe fA Lage? op Sue nee “0! . yg! name bike oA name Eke of’ 8 Oe ee Vyase for meh cheresk ra > 2) sunt name , Ore 7 pope“ prpletorfaren fav second % letter fra werd aver <7 poet ” Gndeyace re and ppm Zicee posite @ 1) verurer imp, 2 gma CARD (J feb ve wy they (n) Dma € degnamat mernowg altoceKoyy | Cyf tegrs weap) © @ Dard He YD pate THME y» DATE, TIME 2) T TMES TAMP Co combine deta F Bdrm fm number, 2 Lunar atartly point ( Tan £:19 Fey f Exe y cliff erenr valuta 1 omy from column tn Take D Sted Dytind” cont fren — 2) Whew aly Not ‘Bertin’ op Fane # from peble Rhee pot a z !Berlin? » ? =. | ae. 5 pcm (SOL conta neds p) Suet all record from cyptomer tuble dort o aeaee/| v “oy? > Shee * from Caterer Rewerne Ovdev 54 “oS ] oxder 4 ls Dee y (oreer a country Hen aG) D> order 4 om ntey , FS 2) Chere popteteede. is ruil [eh] porivnte [3] mst (yah mat) ¥Y [opace I ape woth [20h] 4) [fotest ints] poet — ) (vate D5 J urn iy > (i Tm ar Cy =LI y courg © when TO 32; G) [detent Prom |Table dilete Prom Tables eae) county = ‘__—’, athele table y) tetele) Mu we py bhers Det ahem Spoerater ( = ,>,<,9>2, <=, l=) Between, Like , Gn d u (Between SE be, 7 Cedtain oS Prot mettle Fonge y Prmcrible Valuse in purem Coleman, & ( Bits een| soe fe) Chg in (Peas! Banety Like qperatew iy Stop uct a a 4%’ Wem «§ a 5 S49’ ti’) ype 2 MD) ated ane? iv) Stor a >» far’ “and at lee foo Chaves h Lin ltagth ‘_yy' & fy alt “ Second ee “ip, or %? (a ‘0 in age potion En G sohere el nt sto sith ‘a! 5 kel Say’ > (paral ety BEBE S07" 8 fine jeter 4 a, C, or F from anf (ong fay) ity [Bike] ¢ h? ; a [eee] city [Bike] a PP} yl Ta-pyh’ @ Ashert pot Detter note Ola py A! [ashore] oxy [ike try WE [eke] Ll! acs] % . A Not betrecen lov 20 neve] (EI 1o/=d] Be 5 Detsve (DOL) Crealéd | arf, fruncele , alld , rename 2D Foren col Foble pene 5 (dust ol anpideg ms P fort. adeklg 9 If Fable pore ¢ a fie “= root Jad (——? oe) reno — ) Pi) Fer color ar i pt 1d” rhe (—? Arp a # [Gre 4 clause ( gry om) v & as polegs denpgte sin @50h cefortmerd partition the due 9 enfloge Ta, Nave, Your, Db, SD ply inte gmap byed or Certs critena ) fetes) Der, tron (549 [fre] Enplyea UA cE fy. are me gop Od, (for ex G& (Gn by ardev bp) bon bo par nod boupronti 40 each ear Ordered by county certh mort coytomer frat come 6 LO), 2D etek County cya one (om 4] Cour (Ep) dese 5 - x x # oberaton : {< > dlyo rot gad D Bihoke sperater “fo bute 81-42 Stentor) Bihoipe operators convert Inléseye : inte bénany bifa ton eo Wile y Ube tp match ad. (a ( deny of db ¥ (ay @seey OF zere ov mere d x) Charmetin BLN) C09 am indian oy i bie Boy wn s hea before feralty converting he Bina GB te set ae Vane EU bak into an salger Oo | hevacta,, 4 [71 me oy Ge. Dectas Giten Farge ~ = @ eae! Citloowey, Derla re Declare @ Biko» BIT= 9 ee © Biteneany = 240 Deer @ Biter INT = a0 i f/ Bit See @ Biter/ 3/@ 6: es conn Nt 0 LENO Biteme 1 @ Bithos- 2 wer 2 O a (ti6n D S246 SOL. continssed A zy both b°: et en (Relim £ af ore but rot he Ore ejuat b 1) Compourd pereters: perform operations ona variable then sek Lhe wept of the vanable to resule _of operation, & Declare @ addyalie (nt =to eis eaunigg Se Beate Bes [ORL Print out ( 6 adllvalue 3x VARCHAR), ste stateais “peatt Prot @ addatrig : bopiceh shevotort jakicn reliim true ¥ fobe ! (Pus alate biy tecktaee frais ae iy trons [vip Like nD [KS Mic sr dstgey, Va rej Some YD ex) vil) not OP Anol LL WO In 1) oR (Fre Bil) Seteck —prbotnt name Pen Aebyery Moles mdtmtn $eefied condition, fem prodascks Asher — product -f > fpr] (suee Producd from onde ( filtering AU the predud” wtih Raye Yeeomk Ln onde table, YY Selak ® from per tehere ae [eehoun] 2» ond ap , » Sele Name from cystomert phere opibT (Seteer” order From Onleyr shove Ul - Ly, pat fom wor ( by tferatsr incudge soon firptname Jr ( “abbr, Raw! ‘Saqam') he Jel aba ere Classe) SD Sak » from Upon urhore name pike ‘be y? ae _—— shy operators Dt (Strig concatenation) » Vy) + = Gime ” Up gnmend) ; ExQ Select ‘clade! + quest’ 7 Declare @) strvar — Varchar(so se @® Byer =* Date’ Gn ’ Se @ gor t= “guet'? Paint @ ptrver — # Fafortont Clauses

You might also like