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/ 15
Net UL Ceudux ed Query Language)
ic.
QT findroduced by 28M in_1970's. Predol —_—
a _| Which ts used $@ communtcade with database. asi
[SQL SQL 1s a non procedutal Language which sas
pe siktdh can ust do Comunicate wish ROMS
Coornman language Indusface). Th
lUsER
Igor t5 nod case_sensttive languaye Phat we can unbte sei
ected quesies ot syndoacs $o_any Case Chaya dads
Cather upper ox loser) ———
Sia SS a tan
Ruf t4 ts optional ?n_s@l sieves, 8 gaa+ Tosex}
= Delede
a Q q-banguage (021) ‘
f+ Comme be
{|
H KMECT
| Transaction Contsal Lanquaye Cer)
ieeeData Uek:nation Language = DDL al
Thisi: Language commands Yo delice al
Dxope it is used do Adee both isbeadune &xccord:dasid in dalle |
| Syd om rag i
[Al\dew> it is used do ales She styubuxe af database
Gall Teuncode > i+ fa? usd Adele ail ous fom table ond
q
ond__Dxap. bailed ee
Cxtade id | TwitGand el incedde son distin fe
syntax = C@tatTe Tneit table mame
—_______(toluma name Oatetyep f.1)5—
Seer de space —Comhinios ithe dgbhe] : a) al a
: PD a ke 2st
CO E —_..e- -
Maa 0 I Jk A2gDT mal teesaes — \
DML corms
Tats xes ponsible pe
eiial eo. » £
a “Shay a a
ae
[pre Pesan — et
ee eee Yable-not —
Pa ole tole a =
values (value diveolse 2 stalued'o--
Upnate table nove SET =
Lecolurn—none +.
column on
[ushxe cond:4:
slide = Used to vemove ont ox more xous Smo table —
—pavais —_DE LTE fan Sable none Luheve condittenlp
me Query _Lan age (nar) —
Don ot. Used tn Seach data Fryer dadabase
ON Condition described 1s
3 7 |
Far TABIES Were condihatll
aselnasnate
y oe
Page
Txansactian Condxa! statment CrUL)
= ‘ Tt commands can only be used with DL commands . |
ase | This -Openabtons Lore! aidoinaltialy corwmided tm dadabose
: fs
nbaye ss dats why corn be used
Comm) A
Sop 9 DELETE FROM CUSTOMERS
WHERE! AGE: 25:
___commr Ts
Tita |pothack = used to undo dcansactian Ynet have nod saved
dons ROLLBACK
QELETE FRom Customers
ASE 2255
WERE
Rowpack;
Str pied used de vallhock Jo cexdain point unlike ocollbads.
cL)
used Yo Grant ox dakeback
J DCL Cororoan
Joudhowidy Fro _any ata hake users
Grant: used to give access to dotabast
mbon: GRANT SELECT UPDATE ON SY. TABLE TO Useeall >
aes
1 tEncorwle
a
Ci REVouE = used bo dake back petiatssion fsa _usty a
wt Suntex = REVOKE SELECT UPDATE ON MY TABLE Rom USER A oo
Exorpe
oa Be : Bares| Conss¥aint
Péiroary key
Used _4o
Null
a
| Eattian key
c
values con} be= nudt
yaltdebs candiiten fet gic glia
Default
[sek delauld value it nod passed.
Gcde Rides Jue Jo speedup th a
values cand tadch any | oldex value | _
xetoven(es a Yow in Ongdhes table |at?
— Sab P : ao
—— Opeetot born 9f
Jima 7
er ofinyiat—\
- He ) }
Operator operates __) \opecatoy 1
A)||Awthwebic operates =
+ adds value of badh opexand —
a igtd band opevand $xom Ld hand opecond
* BedG ist LdWirophinds 1
ee divide 1h) bend epreand b bi Vand opaandl m
Pe ii,
sitband gpecand ov
“band operand and xebosint seuJ equal edition beeing taut.
checks if \ef opecaod
if yer. canditian hecames due
L checks +5_x5: cand
ik yar
| ch ya
—— As cus ae
AD Ichecks “fief fait pl gat sight sah value.
£4 yes ndidion becoms }xuei Ee Fd cpetfied “isd val
[i meverses dhe meaning | fotoasi gf Dee
id combos vetegtinle cindliers94 So. fa, 1D ahi} _-*
sed to search fos peesioce oF Sow im specified Jal
f hue Jo-similas values Wing sildcard tSyren 3 SELECT colux _ Excrmple 3)
FROM doble-nore. SELEC ss C6 ont (*)
WHERE di¥inn Egor Propuit. mésT TE _
GrouP AY Jaret GROUP RY company >
ORDER BY column stitutes ab Gane
HAVIN 4 c= bd
ty 25 used 4+ aspects a search condition foro giaup of agetcade
Sybex ) SELECT columod ,Coken) __ Fxxanple 3)__ Ss
ERom table snare SELECT Company 4 Gun (#
WHERE on difions “ FRom PRonULT = MASTE |
GRour BY columnt Colunnd GRouP BY Company J
MaytwG condifians HAVING Count Ct) 225
ORnerR BY» columnt celui
ORDER BYTE 12 sos)s wsuld seb im Oscendig OF descending onder
ox 2) SELECT colar, column Enoeple> s€iect *
FROM Jeble name FRot) CustoMER
WHERE cond ihen ORDER BY me
ORDER BY Cunt (olywnd... ASC pss»caolate su of ol seleched colunns).
fe Seilda only
Ss calislets averqe value ot renoceic Sy pe.
po SELECT OAV G Ccoluinn mrt) Keene able name
Is Fun. fon_helps do ddetiinn laryal value Seon select
er, Costume nent] Crom Aae\¢ name
ios Small aby Fitts \
SASELECT MIN Cooly a Ercha: PF nase tan
ing di f
fy god) wildcards +
Me .
iM x
Ce 2
ke ‘av
4
‘ 4
_ | ie fyi
: ke ‘yoo!
k pes
Finds ony valud that have “ax” in any pasifion
w bi
ompany Nome 1 Finds any values Phat have “6? tn _seeand pasi}ien
LIKE yy’
|} Finds ary valug thd sdovds uth “and itn ‘0
wot
‘a1. 0@
7
tink ~
i
1
*
- eT
bit. Fin
Le extn 200 08 most ____}* :
4 — Rep black , blue ylebe:
fo chew. —
= oan chatache Kut Finds hod 2
Reprise any snsle Chazadex witin | hoa S:04s hod and b
dhe_bsackels ation bit nod ht}
ptm toy cheat md tn |}
hLhoals finds heh
Phe bracket!
—thhut wath tchven dal
a Ri
cs en single Chapace
uh Sanit
ICfo-d\$ Finds
$f St ad, cod edith
Pee Oe ;ol e
FRom 4abled
Inwee Sorw Saber
ON dablet. colsion mare = dable?.colurn name»
Fis beyond stuns ol sends sea RE Anble ond onli needs Spam
fright Batle —__
I Synd ont SELEC eZ
From 4 able £
LEFT JOIN doable 2
ON dable t-colvwa snare =dabled salva names ss
Ths fapiosd xchun) ath xecords ftom ‘iaht 4etle_aand rastsing xecads S1om
Sylax SELECT colon nar
Fgori Doble £
REouT Fem Sorw tab\e2SELECE clumn nant, s vs
i } &
SS eee Td doblet 2 =
r Puree onditions Spt a
I]
| Union Sowator
|
i p——_The_Utizon opsstor 25 usd }6- tonh me
- +__fronxe, StuectT stdemeds,
i
SLT tolunnen aig —ERort Sable? .
Bc,
J a Lisa _-
Jind valusy by dete. do’ alley dle