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

Lamnguagethot Salprcde-Fned: Also Colled Os 5equeal Cli Lnguaje

1. SOL is a non-procedural language introduced by IBM in 1974 which is used to communicate with databases. It is also called SQL (Structured Query Language). 2. SOL has sublanguages like SOL DDL for data definition, SOL DML for data manipulation, and SOL DCL for data control. SOL DDL is used to define database objects like tables. SOL DML commands like Select, Insert, Update, Delete are used to retrieve and manipulate data. 3. SOL is not case sensitive and statements can end with an optional semicolon. It supports creating, modifying and deleting database objects like tables, columns, and data.

Uploaded by

Hemant Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Lamnguagethot Salprcde-Fned: Also Colled Os 5equeal Cli Lnguaje

1. SOL is a non-procedural language introduced by IBM in 1974 which is used to communicate with databases. It is also called SQL (Structured Query Language). 2. SOL has sublanguages like SOL DDL for data definition, SOL DML for data manipulation, and SOL DCL for data control. SOL DDL is used to define database objects like tables. SOL DML commands like Select, Insert, Update, Delete are used to retrieve and manipulate data. 3. SOL is not case sensitive and statements can end with an optional semicolon. It supports creating, modifying and deleting database objects like tables, columns, and data.

Uploaded by

Hemant Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

SOL CSucturod uem Language)

S0L SaLis a non pmed unal Languoge


IBM in 1I19S
uhich das inhodu ca.cd by h e
Communi Cote withcdatabose
Which is Used to

DG
s0L
Catate
USer Tnseat
Upate
Delete
Select

-SaLis also Colled os 5equeal ot CLI lnguaje.


CCommon Longuage Intefoca), This is only
the language tohich_Can Use to Communica
Lith ony RD6 ms padduct.
Oaacle

SOL SemNer RDBM5


Prduct

USes y SOL

SOL is not CaSe SemSiive lamnguagethot e


an wte SaLPrcde-fned queames
orSntoces
in Ony Case chamac texs: Cethe UPpea o7_
iey [email protected] ends_oith o
comiColom but tis optional in 5aL sesver
Sublanguages oS0L
Duta Dejínakon languoge ( DDL)
Corcate
Ates
Sp-Remame
umCote
DaDP-
Dota momupulabon longuage CoML
Tnse+
UpDate
Delete

Data_OuemLomguage CDL)
Select+

smSachon antwl lamgua


Commit

RoLLAack
50vepoint.

Dota ontnl anguage. CDCL)


Gasomt
Renloke_
Defnahion Lamguage)
D DDL CData
ooe USing
TO defne,
Commamds
This Longuage 0t doBobase om
Dop om_ objeck
odit
50L Sesves

Cacate. - Caeahing a new dotabase OTne


table im saL Semver

Sep1 -Cacote o neo doBobase in SaL Serve


Symtoz CacaBedoBobase (DB NAME);
Ccate dotabase MYDB

Step2 - Select The dequicd database tmm


SaL S e e s
Syntoa -U6eCDA Name
USe YDS

Step 3 - CacaBe new toble in databose


Synto -(atate toble Toble Nome
CColumnNomaLOT LSizo1, Column Nome2
L0T [S1zo] Jooo Coluns
-

Ec-Cacote Toble Shudemt


Csid mt
Sname chor Cio)s 6fec De cimal
Lf2)
AGE Tnyint)
Step4 To Nie theSmuctue of fable.
Sntar Sp-HELp LToble Name
Ex Sp-HELp ShudemtE
HELP is prcclened Sinotd au pn@dine
LTER lochange o& maditiythe stauchu
Ca able oadatoba5e

sing the Alte lommGnd weCn pefeea


afollowing fbu opexahions_omesistingtoble
Tpefvtm these opersotionS we ocquioed
Sub Comnmomds_of olte
iAlte - Alfe Colunn
ii) AlHer_AddJ

i i Sp-Rename
iN) ALTER-DmP-

Alle- Alte Column - To ch.omge datotypef


also Siz0 0F the datotype 0f a pexhCulaa lolumn-
yntat 8-

AHes toble LIN AHer Column KColumn Nam


NeL DT CNet Sizal:

i - Ale toble shident Alles Column SNam


Vomchor C50

Adding one Column wodd


"7 ALte-Add -
cistingtabledoble LTN> ADp LNe_Column
tac-_ALte
Mama> LDI2ESi2e1 -
ALes Table Ghudemt ADDSAddaeSS
Yochor C3o
i ) Sp-Remome. - To charngeaolumnno
a toble. n q m e indatabase
A)Synta. to chonge a Columndameintable =
Sp-Remame Table.Name2.oLD Columns
KNeColumn Nama21.
Nome

Sp-Remame shdlemtSName,Studen
Name. s'
B Synta. to chonge. atable mamo.In
Sp Remame. tKold table dotabas
Name Namoz',LNeo tohl
i-Sp-Remome shidem-, CShdem-dletoils'
OR
Sp-Remame Shuolemtdetoils''shdent'L
iN) ALTER -Dop
thetoble 8-Danpin90 olumn pom
Smta i- ALtex table
LTable. Name Doop
E ColumnLColumnName -
ALtetable Shudemt DaDp Column
AaE
Tuma iDeletin8-0wS fom4ha toble, but
mok SmucHuae. ofAhe table. by USing mate
Commomd not delete a 5pecIRc a0
we Can

o m the table because t d o s e m t support


whee clouse Condihon.

<TableName)i
Symtaou mumcoBe, table
Shucdemt
E mmcate. doble

Docp Daopping 0table foma dotabase


peamaMH
L T a b l eN o m a z i
Synta 2-DaDp table
b Dwp able Shudemt

Mmupulaion lamguage
DiL- (Data Used t o
l a n g u a g e C o m m a m d s ore
This in_datobase.toble

Chomgeat mamipuldBe
dato
anea DWinto a
1Inseat i - msesing inSest
tuo methodsto
IhemeAre
table
table
DLS mtn a -Jnsenting
cull-

i> Impli.cit Method toble


LwAhouE

al Columms intDa
olus or
left _amy Column) Cinto)4TobleMame
Values

SymtacS Tnsert
C V o l u l ,value2, Valuls
E - C e a t e Jable shudent ( STID int SN.
Noscha CLuO), sfee decimal C6, 23, Age SHma
hingin+
Inset intb shudemt Nalues Clol,5AI,
2500, 212
OR
TnSe Shudem Volues C lo2 'JAMES2,
45o0 23)-

i) Eplidt Method 3 n Sexing Nalues


or acquiotd olumns only oith
left any
Column in the toble D
Syntox
Tnset CINTO1
Column Nomas
(TableNamma> (Requized
Naue Clo3 ALLEN').
Hoto o FosemtMultple mlOS int a toble
ynta jos implid+-
Insest [INTOJ(TableNgme> NaluoS
Noluo S, CRo2 CRos1
volues)-
Exi
Inses into
Shudemt+ VoluoS (lO4'SCott
B00, 222, C lo5 Hosd',
laoo, 2552.
5ymo for bepltct 1-
Insent [INTO] LToblelame
CRequired Column
NameS) Walues CRowlNalues) ,CRo w2 Nales
E Insest shudemt C STID) ValueS Clo6), CiO22
Clo3

Upclate. Updating_all s0s data ina


toble at a ime o t c Specifc 0 dcta
m a toble. by Using Whene _ Comdition
Sytac =

Update Table. Nama SET ColumnNome. 1


= (Nale 1 , <ColumnName2 2<value2
Hhenre Condihon

ite a 9ue o updale. employejob as


HR 6ala a h000 whos empioye
Numbem is 788
uplata emp S e t Job CHR, Saln El40oo
whec Empo -7788

all emplojea
ite a guey to Updae
Commiim aS 500
S e t CorMM =50o
Updote Emp

Delete -
Deleting all ous omdha.
h m a Or o Specifc on om
Hable ot a
clause Comditon -

wheme
tha table by using
Syntax [HheaeklonditonJ;

Delete fom 4ableNama.>


Queay to deleBe.
employee. fon
& Jite a

thetable who are woking i n the job is


Clecak
De lele vm Emp lherae Jo cleoak

E wnte a que to delete all_emp


details om the fable
Delele om bmp
DifeenCa.behieom_deleke Tmcate
Deiele mCate
OTHis DML Opesation OItis DDL OpeKation
TH Can delete a SpedßcO His not Possible.
ADs mm tho table

TSupport Hhere 9tdo5ent Suppoa


_clouse Comdinon
Hhere clause Condibom-
tis the. Hemmpoma
data deleiom-
TiS peammam+_
dato delefion
H e Cam a s t o
e
on notocstoae
deleted odota by..
milback Usingdeleked data by_USing
D lback

hecubon Spead is_


Slo EtaCuhion_
fes+
Sp ead1S

You might also like