SQL Server
SQL Server
Truncate “Thole empotee:
“> Truncal® fs mot tworting with: “udHeRe' Condition, '
TE we ration “WIREAE™ Condit — Ayla sil Ahr 09
evr
| D vets Wha Te “Traneet DOL Command ?
| “5 Truncakt wth Loughe data tote ine and duds
entice — fab tnclading Stiucliw= & DML Commands % ——
TO perform — amy Lind of operakren en ‘data Level ee Cy
Pp with DML Commands :
\) Tnseat
ii) Lppate
iW) DELETE
iLINseet \- tte de tig i
We use “TNSERT
CAumna OF “tale ~
Sxgottan = —
FINscar mnro TableNarve yacves Cvaluct, Velusty — )
Axangles—
TEnsear \n® ‘emp’ Volusss (101, stwe’,' gg —30-a002!, 1o208)
LATTo Read the Table doln —— —
Seleck & Prom Emp- a
ong UE Reed Ho mention)
> While inserting — roulhiple ous ab ov
afl “The paranthescs and Thin Conic 0% Aame-
Tuseer NT Emp values Cloly'stuw’, "Ago 2099" 1000) 9
‘(102 siwatornan’ ,12-to-22211, 10000),
oo) Ctos,'-sive Komna’,' 12-86 -2024!, 10000) »
xe we tant ndert the data tte Apedt tte éaluumnas only
Tom vert wall toe Nite THR
{omen (nro —trotentame Cedumttanae,-—-) valyaal values, Values, --—)}
LNSES-® Viale ever Tee Ovdig manttmad tr TE Cautions tn
ame. ony deka will be Interted.
° “ a menHoning We column name be consul &
eid erro, . . :
@ zn -wy Cae VW we \epe tg .
with cub Volury y dafaadte face “ WWE"
calumny name,
te oot—* UPDATE # -_
updating Tht table
—) exinled — taformakim We Con gy,
With ak a “Uponte’ command +
i Syalans- ;
{ = pence’ taaicname ‘ser’ coLvawname a'valus’
“uHGRe’ CONDITION »
update Gnp’ SEr Salay 90000 WHERE mp2 lo L
D> we con update’ raltple Columns ab a-tirne ing Tha
wHEre’ ‘upoaTe’ commends -
ey.
poste “emp” SET salarys 3000, DeT-) 124-200! woneae enane swat
—_—<* Delete +—
eee ead
To haleting «THR tabi «doa trtermakim UE Can He
‘DeLetE! Command . i
Te ue event mentimed Ta ‘wheres’ Conditim , tha
We wil) olkditc Whe fabk — ingermakton -
Syntan ~ .
DELETE FRom TARLENWme WHERE CONDITION
a
BeLete FRom ‘employe! WHERE erpnio 4 toi!
FE ae ue wank As delet craig pot fee 8 tebe
Wan
DELETE Fram | Empey! UMERE,. emprto ain( Lol) (03)
6"
DELETE From ‘Employee’ WHERE — ementosioyor empNo= loa +
> Delecbr estl) Leck wow wise “tote duleting onc loy anc turorl,,
ont
— J tant
Seed Volue)- TR Column ok whine ae ,
gine Te wr} daside Starling Twymiee, of Colman.
iw * Ddentty ¥
RE wy oe
Tdlenkity Column loutcalty dspencls stu valeas
Ye 1) Seed
HW) fncremental vale.> OH Athol Telentity calumn Con be dott “inl
datatype only. @
> mostly Tduaiity column » Creabd ok Td-no"
Cdumn only.
synten
Create able Studint Cétutd tok dantity (4)
sla_nara — lanchan( 50)
~~ dake ingestion — - — >
Tosat tts gluduat (shinand Value (‘Yayo’) {°5ita!), C rarra)
— Read rable data — - -
Selest % from Stiles
Nalz'-@ iq clacve Ao Ue can Slorerve Wak “she td ‘ coleumn
To autamakieally — filling wit number’ laked on giten
Seed § tncrementad Volize +
HE @ while wmrg Tdenkty cdumo., 4 wf pecforen DELETE’
commend Win dake wil be dubeted Temporarily, Balk (hee
ule “Trunthke ' TR atx wil be daleled permanently
mods * —
4 DOL som
DSeLecri— Select Cormmmomd ao be ted do vetiteviag
the “eon Valle and aa tae) 0 we Can do Caltulatrns
otlio +
System cfox_tetrieaig data + —
Select 4 from SWident
syton fre _Coledabions +>
select tost2 | ‘ gelect (oor? , Selecr cuvleSA sNolhs- 7! will Yepresnt — aba all Column? fom gq +
Fable -
BD yrite ascleck shatement v2 Arfherent — worn?
Select # from stadent
Select & fam Wee} Cadet),
RANTS select tefrom ete Crew bateh2r) «Cdlee). Cstadent)
que
Sdleck k-feom — [Reco—lootch 22) - [stedante]
NOE copy TE Gmp and dep and bonus, Salary tees |
Syne Grom — eexe qooges |
®S write a Quey to Sekh Name, emp Tob, emp salan
dorm emp tabk? a ad
Seleck empName, empTob, emp salary °
rors emp:
D wrikea Quen fe Feth eName & salon Gorm Gene
Ferdi. who all ane Working Chern = to?"
Sele eName, Salary +
from Emp
where sob) Chew '.
alee.
® writ a
gusty qo etch Gmp Tfermation fore Emme tah
Mio? 2D
whe all ane Working duptnoiio’ !
seleck, See Name
fron ene
yohure, duph nor \o
(oO
Selene * Lom Emp wn
Nites. lene Te! remtioned Lecauye fo Scleet all
ere Deptho=lo.
Cdumnt feo a table -® Wet 6 Guy -to fetch enlorme, Soh frora Emp lab
puke 1R “taking Sallany a -3000"
eetewoe Sa
Select “stom me — whow — Salon = 2o00-
oo
Select entame, sal
from Emp
where — salony = 3000+
® Wee a quay to Airday enlame perpLo, sola trom
emp table , Whose Saleny & more Wan \S007
Seleak Nara, emePo, sal
from Emp
Wier Sol Suswo
> Wile © Quay to fetch Emp mnformebien form | Emme
tab who Faking — Salary “ps Wan 20007
Select emp there Salant “