0% found this document useful (0 votes)
80 views11 pages

DBMS Assignment DML &DDL

This document provides examples of Data Manipulation Language (DML) and Data Definition Language (DDL) statements in SQL. It discusses the SELECT, INSERT, UPDATE, and DELETE statements that are used to manipulate data in tables. It also discusses the CREATE, ALTER, and DROP statements that are used to define and modify database schema objects like tables and databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views11 pages

DBMS Assignment DML &DDL

This document provides examples of Data Manipulation Language (DML) and Data Definition Language (DDL) statements in SQL. It discusses the SELECT, INSERT, UPDATE, and DELETE statements that are used to manipulate data in tables. It also discusses the CREATE, ALTER, and DROP statements that are used to define and modify database schema objects like tables and databases.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

NAME:RRUDHRA

MO0 PTHy

CLASS TT 8sc Ce)

EC B 8ECT/ON

OB DBMS A.SS16N MEAlT


ML &DDL)

DATE 1309/2021
RoLLNO 19CS22
Dbms Adlomes

1 Eiaun ukout DML ONd DDL p0Lutious


A oto Mauipulaten
Auunguaye CAML)
DML atemuts 4heuE Yeuorcls toul. Thu
opoLetiens dlata
deloctinyahew e0od hem a ttabl, b , indecti rlo
eCoycls doludtins hn etoy ecouls ond tpadating
eins ve Covds

ML t em

SELECT
1 INERT
tPOATE
) DELETE
wl tule m) Statennent

SELECT STATEMENT
Seloct uloct Yewvcls
sionpy
*7he SELECT ptat ernet usel 4tlott data hom
databan

Cult Storeel Uult Tabla Culloel


ttal s ult -

Att

SELECT SyNTAK

SELECT lamn namt Coymn- raml


Frevn tolble- name

SElECT ffon tabl -nam

elut o all Yecols


om t tola

TASET

sett u Used t0 tnaeut rw ye Covds


e Tnsett (NTO tatemtt
nsect
Ye ctoyols
tallL
Poiplr to wvit TnoERT NTO
Tt
dtademet twp fovmmA

Tl st tue
hamt wheye
oun
u dada
data
not

ullu
4pudky
bt tnseuted
Coluurn
uly ttaly
Valuus
SWTAK
(nSERT INTo bll_ homl
VALDESvlalue Valuu g Valuu 3, )
USnd oun
peultjies ottu tu Column
nanl Qndl tu Valus to bL nSeteel

INELT INTO tabl _nCunt


Column, COUmnR Colunn &
()
VALUE (Valulu1, VLL R alug 3..
WL Suend form yuctoo tue
CPCOm
Tablu Nunt CHOCOLATE
CHOCOLPTTE fLAVOOR CosT CoL OOR
NAME CoUNTRy
dalc Chinq
MUNH oho Colah

fIVESTAR clak Chwna


Cuutayd 50

SNICRERS BYouonie black


MLIYBAR srauy ohitt Tnclia

O3IAG WERy
TWSERT INTO ChocoLATE uocalcte Naumt Hawoun
Coat
ColouN Couutry)
VALDES PER brouwwe' 50
olonL vou, ncl'
WL
Nnlding rw
UTPOT
CHoCOLATE fLAVOOR Co9T CoLOOR CooNTRy
NAME
dlaun Cuina
MUAlCH Plaglal 150

FlVESTAR CuLstand 50 dauk china


DUM
SNICERS rOwnte 70
Blae Tndia
MILKyBAR Stsae Cwwlitt
Jnodla
PER Brewne 250 dorlL

rdla
MnS that uOuy inutted
a nu Yw, ti
6h YOw Culth Couunodhy dctal
DAyE
Opdart pdate/modlyy isting Te col

PDATE statemtut Ld to upolali


eED ny 1ecols in a
Syatan
UPDATE tal- haml
SET Blunn valuu Clunn &: Valul
WHERE Se me Colmn SOmValug

DELETE
iwply
ult- Oelc Bein
Yeugeds.
Tt t
POsdlbLe t de delate Qll
table a
thoct delutins t
At tal tabl. is means zhat
h a
strLct uNe abttib utu ahol ind ees
o itot

DELETE fROM talle -name

0ELETE FROM tanle ndme


DDL (Oata dihmitio louuase)
DL sttt emtsus QU udeel to Otermolfy a

database Auctuo Ahd


Shoma
Stateintrt handlt duln an ol dpago
dad akaut bjech

eREATE
ALTER

DROP
CREATE
Cyeati Aael CAOut a w taute, odatakauz

Oreating TAkle
CREATE THBLE tahll name

Coluwnn hamel
data pe
Colwm namt-

data type
ALTER STATEMENT

At stateinevt aste mooliy L


Distin tabl
Used to add () delitu Cgluumn
uths talle
4yutaa fov Adoln glu

ALTER TABLE tihll- hamL>


ADD Coluwnn -nam > data ye>

4cto olttin Colmn


ALTER THBLE Ctabla ndml
DRoP CCoun -hannl> Ldata type
Add viaulns hamed No Vieuy

ALTER TABLE Vieuuns


ADD Noof Views t t

Selott COWnm ommeut Viewn


ALT ER TABLE Vieuning
DRoP COmnevt Char

DROP 8TATE MENIT


Used o dulut
dudakese taslu
oltins a databtue
DRoP DATABAS E datakaAe hame _

Delctihs a tabl
DPOP TABLE tal - hame>
Exanmplu (M)

Delct ttt tablu Vjeulng Ond Rogistodion


DLOp TABLE Viuis
DROP TASLE
Rogistroct b

tue Nean hem dadtokus


DRoP DATABASE Draam honn

You might also like