Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
14 views
SQL Notes1
oracle
Uploaded by
Upendra Singh
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save SQL NOTES1 For Later
Download
Save
Save SQL NOTES1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
14 views
SQL Notes1
oracle
Uploaded by
Upendra Singh
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save SQL NOTES1 For Later
Carousel Previous
Carousel Next
Save
Save SQL NOTES1 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 67
Search
Fullscreen
ortacle Sal S Area iq. dows ood Enter yl > 7a otpical sive Me Chbit | cast *ObSect of Oracle ee rh is Lied to, uyove intosmation 5 MeO + (onicany Tepesent Subset of data From One ox more, table. 3) Sequence + Used to qenesate Pr mony Key nasue. Tndex + 4h is ured to impaove the pasfoemanre ofOF aerated obs 4 Vales fos Crate otab 9 Nome of rere > tate nase ‘Seamed 8 Comer SeamerCreate sabie * Stud C Pol wurmdes NUMbES CS) - Name ion Varrehorrs (2 ) 7 | Rorliumb ox | some] * SQL Tn taodue Hor S Seu - Stands tox * Buery \anquse” Nery *latond| databsse sottwooss intract wirn o lanquay? Known a sage : because WS 0 simple english live lonquaye which Guideline are psovided 4 Standard Oxqaniration CAnst> adopied oy au -dutabale yendnrs Osacie live 1 MYSQl, THilrOsok+ ere --- An seis Nery COMPeY tanqguoge © weduace jy. ea[)) Qename- rename tdbie nde, Sunray + ye 40 pONamMe + sename rable-name *O dewhame » eq, TRNAMF Kabye EMP +o G @ prier .- Suntat \ Alter table yable-nam? Ade dokatype ; T-Name eq, alte tdlole Emp add salary Number (10) ¢ S raole altered.NDivverence perween dvuncade % AvP TVruneate Tuncare command 3f Wed to swemMove only table veind, Nie cam insest @ecord i table, e eq _ twuncate table emp: b sabre iuncated. Dp + dop command i wed 40 serooye toon sable gg +d? Tetowds egneo tl e +abje srsuciuy alo desop, eq, Wg) table ump. ’ > rabie davp.Cdata manipulade Canquage > «Th deal with dato of obvsects. I “Gh Provide > cornea 4 Insen t & Update Qinserdiy > Dedere. Syntax : MSea} S910
one ea. pda? Emp cet Rede ename = nyidya" Ohere Rid 2 to) ; > “Pame> whese & codition > where td 210) 3 Fe fi Pixs? tk4 Faom, tob\e-namme > ; 10 [Display pavticuks record Wi Seleck x fxr atu where TONRO*? 5 iD dieth . a) Name column sch Name From srud 3 5 pre transaction OF dotabaie i+ orate annRasom srablecname> where condHenry Operahon. 2 berween eedOwacte Qa OPetatos 19 SO * What 15 operators in SQL g an > OP enators ave Some chadatter ov Key which 15 we on an expression 10 om omy Opes asrion The operator of MO s aypes, ” ary SQL can be Cahkeqoazeof OPE AS ory eee oe : oy Ofer odov— Ary Pe) | opercatere f Lupton 7S "Dionay Minus m Mierset.~ alter table srun daop Columy + xaddr¢ 55 + ‘erord in aeending order C ‘splay record.*S@C functton » tiWhad if function f ( Plainahion FuNckion are the opiect im sat which take PACT Mone inpul From user, 4aKe operation 2m inpw Gnd produce one ov move owput E 4- inpws =~ one ous put I ¢ More-dnpw —-__» More owput i E Pipes 5 Funct Os : Weqare Function | Group Function | mutti-row oo S916 ro. Function \ Functionby Clause Perform tis Btn burees Not io database.BOW Function accept ™O one value. eS @ach yond and BUUTN OMe result fexaen BOS Function can be Nested up to PPh Yy DithH see ca, Whee amd Bee Y clause Ties of s;, 1 Choracten Purction “Numb ex Function Dote function ‘Seamed By Comer Seamer‘Seamed Came Seame!e Fun CHO hs apmed) ¢ a-125 From dual, Onrss _ AbSuute tuncti oz, “ABs Function seu in the absolube Value DF py Be Given co RAP TENT on, Seen dbs ¢ Ly eats ®cery The ~ 18%) brsoen duu; cay BCD eur, ine nent ioseqey Yeah ig 4; 494 e than oF equal to g Sumber SMatert whole DUMHE greet ev om Ual to 4 Speci ties Numberme | tpad CSubStr ( fe \R! EP) E
salacy 42.000; tyacrioo eu Sdlory > ve (Salary, 0D7 geesEmprlarne salary Cormmidsson Alay Kurnor 30,000 cH Empid, empnam?, saary | comm sss’on, 4+ coremission totelsaleny Pree eps Emprdame, starry , AVL L Commission, oF $3100 AVL SdotYy,0 ) + AVL ( comms 3539p, 95 is a 1 Sa oe y Crom employee: Ale nul ond ANdtAUU Values Not QuyMaVING claude & ful explainan'on. clause sesincting tyne group MG Crouse will ways we use with Ree teciouse and evaucted aft ew forming °F groups, TM elimincses ine Non. Marching group. “UP oy ; Bee 1S used 45 OssANGE Sirmilax data erm 1940 Set of \ogical group AMIAX ¢ | -. Eero Serect col-mamet, colname 2 ,--- FTO name — AXOlo\e-name y qsoup toy column : 10 my Adbie Want to See How many depr 1° MY i ‘Sean By Comer Senerc+ dname, Countcx> Esorn Emp having Count Cr) 94 eoup oy Aname —dname, esal from emp having esal7 2000 ’Y dname, esol;“Wha 18 alias P Fuld Crplajraiion > SQL atias 8 column F tabie 1S uted to give o dempovary Name oi TE CaN use alias im 40 4ed0 woys % column alias 2) tab\0 alias, “Syntax + Column alias Select BO name. as
Oomain WOhegrisy CON Staajn t Udetauy Not vay Che oi p>) Entity iNtegwry constaint 4 Unique Re by Pumary Key 2) Relerentsay Wntequity cortraint: Play KAY Constraings MPOSe integrity constrains Inside the time of table (Seatonoa + constrain + # we impose a default consivaint along With a CUMH hen tha column rested Bed Vimopliciys aw" value ond Pehaly of nu value it dubstitwe delaut Value, ETS Comsteaint oni y oRPlY on single Columns oa 3. Create sable emptbs ( eid nurnder (10), ename BPO) ah Kuen ex ¢ 10) cleFoutt 100005: inoery WFO eMPAb) ( eich, Ename> Value (0), ‘anyit): ey dekaut | not insertedwto insert CHECK constsaj n+ allow The chece Fed Value in a column - lumo : ingle co ODStrains Bageorny 1m 8M P2¥ cam be tmposes babe level and Column level BOBS Stu Coino Oumber Check CrO11N0 Bo) name Vorchar (no) ) + Indext into atu volue Cz0,, > Abhi’); SIT —> Checy COM Stain 4 CS: GUL Violen Ino StU Vale, ee Pb hi).innegn'ty Constveun f # ofoa) Uy r entity inteqaity constrasn inser} “nique value ona Column TWo WWpey Be oDiGUe tonsirciiny 2. Primary Key constraint Oniaque Uique ONStBain} gejbwe} + Pamory Fey constrains 40 inser s dupiicare Nalue TAI CH to inserg Be Column, rue mee Value on o eolumn gy weu oy n . MDD uy Vellue, PULL oy alias ne “aire Can pe dering 1 one. OMe e Unique I or MUU pro Const ot BRDPOA,., rey)id number Psion y Key, €sal Nurovdey 9; t into SOP Cio! , ‘Vitay’ 19000); 4 140 exnp II Vi rpayfa’, 10000)" It oreay Pereatcalled crn\d AHoIe e Foveiqn Fey ye values mut oluronr this Column to Teherence Key ¢ child tebe,eae eonps cet Vor! Yanriy’ )F000 MOdsg, : _ “ankush’ 1000, \46 ym | Seen rs 12 ~| hho 14o she Employee Which Deptrame 1S. ccie Sees? Emp ehere Deptip ing Did Crom deps eee a6! 5; \ whien Salary Tayo. Seer where Did ToC ale ah ‘Sean By Comer SeamerYY Clouse. a] j e Rin SQL. Wha i§ omer bY clause 9 We use osdes bY clause to AvTeMGe the wecowg BUEOReLos Move Cec orcling onder columns eisher ascending or rte + 4 Sovts the -secord OY defaurts. Suntan : in ascending onder Select x fom 24able-namy orden 8 COluron ans Sc] dese, * Tabo\e EmpPemeo Ename Income Doy anti} 20000 ae eee uray 0000 eee: 5, \Sovo ‘Ss BORA 0-05 6 Pt 0- ne, — 20000 04 -Fan- larsNe Form test wnere by fame dese : 2@ the business ule’ which culoaet +O. BE siaic popes data inside sabie, 3 osoce tne Inteqtity consivaints ciassitied \nto S-QsOUPs . *Classificaton of ConstsaiNts % Borman integrity const saint. > detawt Noy null check. D EMlity intequity consisaint a | i> Unique ¥ey b> Primoty Key. % Ret éenrial inrequty constraint >) impose loreqsty constraint fosido the time of fable CBO Ongaity constaaind § ’ ait Per icalni quod wi to Insert a “column ; : a © are 40 +4PeS OF ae ey ree Constaun Apaimany Constaaint % unique constraint : — ; | ue Key Prmory Key MAE “Constraint werrcl | 4: Pairary Key consteaind 'IMSext cluplicate value Ferigct to insert NA Column but it attow duplicate yalue ong Vode. column as wetlr ay Bec: Na value. be detine ig one ‘ 2 onlixe Unique Constraint muttipie ' B ooo table contain onty | one eer Fey column, | |‘Key 15 Setot one or more S]eotumns of a Aable tad Uniquely Wentisy a mecord in a datdbase table. + Saki of "YOU can say snot it is little live Primary rey ! but it can acceps only one Nu value and 1+ cannot Rove duplicare yatier + DeFni 4 a uoique Fey constraint 0 Single F COlumn, Create sdole Student ( S-Id number unique , | Lastdame Vvarcharn (10> , Fixitname Narscharn C30), C144 varchar (30) ): Bekining a unique key constraint of rowtiple : UMNS IE AMIE Student C Std number ¢109,las!-Name | cn20) » Plastename Nosscharn ¢s0D Aoi Sows eres ny) -TA, Lasiname 5 as y epapin t. taint of Altes Tobie, th 3% OUALY IS x = Adld Unig cic = Saini Be agms> ‘Sb“primary Key, You iO} when teu cnet {briny Fe, Povees ne copay inteqayy % Basa ba unique, daa. atin cannot ve exee exceedea], *4 01 Alles Janie, 2 MeO ave 1§ already created and qou wank to Rake og Paimnarcy Key condtraint of S80" colurnn you should we Fo\\owing : Parmar y ¥RY ON one columo Mtee jamie student add Paimary Fey (S15 TPwmory Key on multiple columns. Biter satcre student add corstsal N+ Prsiudtd Primary Key (sto, Laut Name > *How to deop Pricoary Key conotoaing BES ident > deop constraint PK _studTOCopying Rows FrOTM Another table ¥ Sylar MSex} into KFixst-table-namne> (cols, Co1a,---> | 4 p Select col, 0a, Cola --- From
set
a pw value > where condingn -There one F tyPa Join iO Sq Ter disicr, Be OU have minimum Two tabie. “act least one ae SIUM AOTE AMEN. Ip I bor, table. => To Show the MUHPIE secorol From MU Hipie taloje 'Dt0 One tabie, | oO equi To}n *“Saecs * Peso emp | emMPdem og Where E™MPdemo vig 3 a sid = Prole SSiong] \sowr teather chottor teathex codev Cashionts0omM Beare! cddeees = woo 00 ore sond: sd > Pessonal, Professiond| Where Pex Persona). ids fesorn Host <88600d-tab1e-na pn (6 ae “hab faeces - eps balya 4 ee ck Name, Contact, dept $3 0m Persona Bnet Soin Peofession al on Persona). td — OFessiongs vid: mel, colo, Cols proct 4 First - babie-nampy. “Pame> on Athod? pepe meg PS AMeoites column Pome > » & Similar Colurmna £8 etond -tdbie— Name. be as. OPE bat ip Ww, Fevemy to omte.OWT Join © Ft outer soin @ wight outer Join Olett ower Join “AM -secosd of Fixst table and only match Record OF second +tabie. Select name, odd, dept gaom Persona lett owpey ' Join Prohessiona) on CPeronal: id = profewional-jf ds — synrar. Eee a ; Col, , Colm, Cola, Coly Fsom
on Cee fable-name. cermmon column Name =) selene | * COMMON column Name 5 5aw the secosds dh left tab. ght table quo. + dame address, dept From Perea Fu outer Join Perotessiong) on (¢ Pesson a: id = Prohessinal: id) Col,, Colo ,COly Pom
on C Fiesp — Fale namo, common WColumnname = Seco nal AbIe-name. COMMON column Dame aoppiy op ony *AbIe. = 700 columo secord wI\) D0? Match ase $0010 BN one s+abie same at !¢ Select P4. name, Pi,addtess , PA+c Fs0m pessond,P! , Persone po ‘Seamed 8 Came Seame!Expression HME Case expression goer Hrsoug h conc and Felurn a value when the inst . Condi tor 15 meet (|e -i¢ - then —else sictensot Er00 Conditons ave asue, 14 weuin He Value in the ELSE clause. Bete 7. no else Part and no condiHon MO conditon are true, it veburns Wall: Syniax * Gene Case . Bbc o, When When Condiion Thes weSut 4 Condition shen weSsUIE ND Condition then Tesulls Else other veut s ~ Nery 4000)’ ac e's
You might also like
Dbms
PDF
No ratings yet
Dbms
11 pages
SQL Notes2
PDF
No ratings yet
SQL Notes2
30 pages
dbms unit 2
PDF
No ratings yet
dbms unit 2
35 pages
DBMS ASSIGNMENT 2
PDF
No ratings yet
DBMS ASSIGNMENT 2
28 pages
SQL Notes
PDF
No ratings yet
SQL Notes
25 pages
DBMS (Lab)
PDF
No ratings yet
DBMS (Lab)
16 pages
DBMS File (1)
PDF
No ratings yet
DBMS File (1)
24 pages
20bca0211 VL2020210506832 Ast01
PDF
No ratings yet
20bca0211 VL2020210506832 Ast01
18 pages
Dbms Notes
PDF
No ratings yet
Dbms Notes
24 pages
SQL by Jai Shankar Sir
PDF
No ratings yet
SQL by Jai Shankar Sir
158 pages
SQL Server
PDF
No ratings yet
SQL Server
91 pages
DocScanner Oct 29, 2023 5-45 PM
PDF
No ratings yet
DocScanner Oct 29, 2023 5-45 PM
9 pages
SQL Ip
PDF
No ratings yet
SQL Ip
15 pages
DBMS Assignment 2
PDF
No ratings yet
DBMS Assignment 2
5 pages
SQL Queries
PDF
100% (6)
SQL Queries
194 pages
CPA LaboratoryActivity001
PDF
100% (1)
CPA LaboratoryActivity001
6 pages
SQL pdf
PDF
No ratings yet
SQL pdf
36 pages
DBMS
PDF
No ratings yet
DBMS
19 pages
DBMS
PDF
No ratings yet
DBMS
21 pages
DBMS Lab Experiments
PDF
No ratings yet
DBMS Lab Experiments
31 pages
Adobe Scan 09-Dec-2023
PDF
No ratings yet
Adobe Scan 09-Dec-2023
10 pages
SQL Notes PDF
PDF
71% (7)
SQL Notes PDF
170 pages
Dbms 1
PDF
No ratings yet
Dbms 1
24 pages
DBMS Lab
PDF
No ratings yet
DBMS Lab
18 pages
SQL q Spider Notes
PDF
No ratings yet
SQL q Spider Notes
16 pages
DBMS LAB MANUAL(BCS403)
PDF
No ratings yet
DBMS LAB MANUAL(BCS403)
38 pages
Dbms Oracle1111
PDF
No ratings yet
Dbms Oracle1111
36 pages
It6202 Lab - 001
PDF
No ratings yet
It6202 Lab - 001
6 pages
DBMS Lab Manual 13-57
PDF
100% (1)
DBMS Lab Manual 13-57
45 pages
Dbms lab
PDF
No ratings yet
Dbms lab
52 pages
co1 sql
PDF
No ratings yet
co1 sql
8 pages
HandMadeNotes MySQL
PDF
No ratings yet
HandMadeNotes MySQL
14 pages
SQL 1 30
PDF
No ratings yet
SQL 1 30
30 pages
Unit - 3 DBMS
PDF
No ratings yet
Unit - 3 DBMS
25 pages
Practical 5
PDF
No ratings yet
Practical 5
6 pages
Mock Test 8
PDF
No ratings yet
Mock Test 8
40 pages
DBMS Record PartA
PDF
No ratings yet
DBMS Record PartA
24 pages
DBMS unit2-1
PDF
No ratings yet
DBMS unit2-1
27 pages
dbms file(1)
PDF
No ratings yet
dbms file(1)
13 pages
Dbms Record Prog
PDF
No ratings yet
Dbms Record Prog
56 pages
SQL Hand Written
PDF
No ratings yet
SQL Hand Written
17 pages
DBMS Handwritten Notes of Module 1,2,3
PDF
No ratings yet
DBMS Handwritten Notes of Module 1,2,3
45 pages
lab manual RDBMS
PDF
No ratings yet
lab manual RDBMS
22 pages
Lamnguagethot Salprcde-Fned: Also Colled Os 5equeal Cli Lnguaje
PDF
No ratings yet
Lamnguagethot Salprcde-Fned: Also Colled Os 5equeal Cli Lnguaje
9 pages
DBMS Practical Section A
PDF
No ratings yet
DBMS Practical Section A
13 pages
DBMS File PDF
PDF
No ratings yet
DBMS File PDF
74 pages
SQL Notes
PDF
No ratings yet
SQL Notes
22 pages
SQL
PDF
No ratings yet
SQL
13 pages
DBMS LAB 2020-21 (Updated)
PDF
No ratings yet
DBMS LAB 2020-21 (Updated)
24 pages
DBMS Lab Manual (BCS403)
PDF
No ratings yet
DBMS Lab Manual (BCS403)
18 pages
002 Murali SQL Notes
PDF
No ratings yet
002 Murali SQL Notes
36 pages
Unit 3
PDF
No ratings yet
Unit 3
4 pages
DBMS Practical 2
PDF
No ratings yet
DBMS Practical 2
12 pages
PL SQL Queries
PDF
100% (1)
PL SQL Queries
131 pages
DBMS File
PDF
No ratings yet
DBMS File
23 pages
Week 9 Dbms
PDF
No ratings yet
Week 9 Dbms
19 pages
SQL Handwritten Notes
PDF
No ratings yet
SQL Handwritten Notes
21 pages
Csa Sem5
PDF
No ratings yet
Csa Sem5
29 pages
DBMS
PDF
No ratings yet
DBMS
23 pages
Related titles
Click to expand Related Titles
Carousel Previous
Carousel Next
Dbms
PDF
Dbms
SQL Notes2
PDF
SQL Notes2
dbms unit 2
PDF
dbms unit 2
DBMS ASSIGNMENT 2
PDF
DBMS ASSIGNMENT 2
SQL Notes
PDF
SQL Notes
DBMS (Lab)
PDF
DBMS (Lab)
DBMS File (1)
PDF
DBMS File (1)
20bca0211 VL2020210506832 Ast01
PDF
20bca0211 VL2020210506832 Ast01
Dbms Notes
PDF
Dbms Notes
SQL by Jai Shankar Sir
PDF
SQL by Jai Shankar Sir
SQL Server
PDF
SQL Server
DocScanner Oct 29, 2023 5-45 PM
PDF
DocScanner Oct 29, 2023 5-45 PM
SQL Ip
PDF
SQL Ip
DBMS Assignment 2
PDF
DBMS Assignment 2
SQL Queries
PDF
SQL Queries
CPA LaboratoryActivity001
PDF
CPA LaboratoryActivity001
SQL pdf
PDF
SQL pdf
DBMS
PDF
DBMS
DBMS
PDF
DBMS
DBMS Lab Experiments
PDF
DBMS Lab Experiments
Adobe Scan 09-Dec-2023
PDF
Adobe Scan 09-Dec-2023
SQL Notes PDF
PDF
SQL Notes PDF
Dbms 1
PDF
Dbms 1
DBMS Lab
PDF
DBMS Lab
SQL q Spider Notes
PDF
SQL q Spider Notes
DBMS LAB MANUAL(BCS403)
PDF
DBMS LAB MANUAL(BCS403)
Dbms Oracle1111
PDF
Dbms Oracle1111
It6202 Lab - 001
PDF
It6202 Lab - 001
DBMS Lab Manual 13-57
PDF
DBMS Lab Manual 13-57
Dbms lab
PDF
Dbms lab
co1 sql
PDF
co1 sql
HandMadeNotes MySQL
PDF
HandMadeNotes MySQL
SQL 1 30
PDF
SQL 1 30
Unit - 3 DBMS
PDF
Unit - 3 DBMS
Practical 5
PDF
Practical 5
Mock Test 8
PDF
Mock Test 8
DBMS Record PartA
PDF
DBMS Record PartA
DBMS unit2-1
PDF
DBMS unit2-1
dbms file(1)
PDF
dbms file(1)
Dbms Record Prog
PDF
Dbms Record Prog
SQL Hand Written
PDF
SQL Hand Written
DBMS Handwritten Notes of Module 1,2,3
PDF
DBMS Handwritten Notes of Module 1,2,3
lab manual RDBMS
PDF
lab manual RDBMS
Lamnguagethot Salprcde-Fned: Also Colled Os 5equeal Cli Lnguaje
PDF
Lamnguagethot Salprcde-Fned: Also Colled Os 5equeal Cli Lnguaje
DBMS Practical Section A
PDF
DBMS Practical Section A
DBMS File PDF
PDF
DBMS File PDF
SQL Notes
PDF
SQL Notes
SQL
PDF
SQL
DBMS LAB 2020-21 (Updated)
PDF
DBMS LAB 2020-21 (Updated)
DBMS Lab Manual (BCS403)
PDF
DBMS Lab Manual (BCS403)
002 Murali SQL Notes
PDF
002 Murali SQL Notes
Unit 3
PDF
Unit 3
DBMS Practical 2
PDF
DBMS Practical 2
PL SQL Queries
PDF
PL SQL Queries
DBMS File
PDF
DBMS File
Week 9 Dbms
PDF
Week 9 Dbms
SQL Handwritten Notes
PDF
SQL Handwritten Notes
Csa Sem5
PDF
Csa Sem5
DBMS
PDF
DBMS