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

Computer 1 6

This program uses a while loop to calculate the factorial of a number entered by the user. It declares two variables: NUMBER for the input number and RESULT to store the factorial. The loop multiplies the RESULT by the current value of NUMBER until NUMBER reaches 0, at which point the final RESULT is printed.

Uploaded by

mohithooda531
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)
84 views11 pages

Computer 1 6

This program uses a while loop to calculate the factorial of a number entered by the user. It declares two variables: NUMBER for the input number and RESULT to store the factorial. The loop multiplies the RESULT by the current value of NUMBER until NUMBER reaches 0, at which point the final RESULT is printed.

Uploaded by

mohithooda531
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

Date

Expt. No.
Page No.

Eablam Che commgoncs in eL?


allCseat Tabei
CREATE TABLE
s the Kaywod Jellig the
databas tyutemlokat y lett to do he
migue ham
ideafeA for te tabe folious te CREATE THELE
atatieast
eniguely Fach tábta colnn dfniten i sfeated
n t otkes by- a lomnma Tke Sall statmsat
minated lets a demielen
CREATE TABLE <table hame>
(sLolumn apeeiliaton>lelumn akeifiatin
>)
name f fablo and
<column apeclcahio? clde oCaliynn lbme lat tyfe
Examblii

Teacher's Signature:
Date
Expt. No. Page No.

The ALTER TRBLE stentinSAL caed toadd,


Aenee Lmaolily celamn neziatny table The ALTER TAELE
Atakemcntsals cued to dd agdsemouc aious
censthahh en czistiy ble:

ALTER THRLE <tall nonu

<lolunn spucificaon,
Examplia

ALTER TARLE < Tabe nane


< lolunn Alane >< hew aletil for tke caluan>4

Teacher's Signatura:
Date
Expt. No.
Page No.

ALTER THBE <Tabe ame>


ORDP <Coluonn hone

Exampe'

Rutictan

>Chande he nam of Re able


kang e name

lesetLomonandi
Thautcommandà data AIulate
Commond kick ted to maniplat clata by dndeths

Jalle.

Teacher's Signahure:
Date
Expt. No.
Page No.

Syntax is
TNSEKT INTO < Table am>
VALUESUalua i, Valuc2,sse
Enambei
ToenteA asou jinte student tablo
fellacing atakment'a

d pdat Lomnandi

DPOATE <tabh me> St

olmn ii>=< hew tale

LsHERE

Teacher's Signature:
Date
Expt. No.
Page No.

changiy heskuchue atibua fall tape in


thespecfrd talti.
Eample'

eDelete Lonnand i
hiscommand ds sedfo delete estony
Aecss em a table ling tois, yo cam eitie delete

LAecoaRiarm
ynta
OELETE FROY < tablo nam >
LwHERE <lanaihon (s)>1
Thecongnd deleks s

OELETE FROM < lablo ene?

Teacher's Signaure :
Ecamble i

sctiesetfsnation alleady_atoed mtfe dlatabase To


seteese oata, yae Cas eithes áelect all th celmm
Lzlues o name afecifia columas The lect
Atadement
Achise)etbin aecificdinfemoten
catakae tabla
Syataa
SELECTLdlisthnet?<column2
ERDM <tabl hame
wHERE < Caneitien ls)/
foRDER BY < olumn Caxldc7>;

Teacher's Signaure :
Date
Expt. No.
Page No.

Que lhat is foeign key Explan loith an


bromhle

abk, that salors to the plimay key n ano ths tabe:


AFoegn ky s a kod ofcosbsaint which stablsks

Pasent ttle
columale
ofa tabl that s ke fnay
piomay ky af anaths talle.

CREATE TA8LEdekt

lcREATE TA8Eenb
numhe

Teacher's Signatura :
Page No.

Ruecite a

fsegam
IBLR =& B

BEGIN

Then

END IE

DBMS-OUTAUT.PT LWELaigc ramte is llBig


END

Toacher's Signalura:
PL/sRL Jocaloulat ocldten
Aubtiacieny mulhlucahen and douuen of tu nwnes.

PROGRAM
0ELARE
ANumleu=kA

Riult mREK
BEGIN
X!=kEntel Chece
hen
Thea
Elu Xe3, Then Ruulti: AXei

Eli.
OBMS OUTAITPDT- LINE'nnld eftien)

END;

Teacher's Signatura :
Quite fasgsam in lL/saL o imblement okile loop.
PROGRHA
SEI SERVEROUTAT On
DECLARE
nlemtbes i=0j

wlilhslo Loof
hint

DBMs OUTAUTPUT- LWWE(n);

END 0oP;
END;

12

Teacher's Signature :
Expt. No. Date
Page No.

Qwhitk a foregam
hemles
to fond the fahoial of a gon
uanng fo Looo
PROaRAM.
0ECLARE
ENMBER;
NBER ;
BEalN

N= Entey- hbu

OBMS OUTPUTRUTLNE(E)
END LoDP;
END;

You might also like